This is an archive of the discontinued LLVM Phabricator instance.

[AVR] Fix broken bitcast for aliases in non-zero address space
ClosedPublic

Authored by aykevl on Nov 24 2022, 11:35 AM.

Details

Summary

This was triggered by some code in picolibc. The minimal version looks like this:

double infinity(void) {
   return 5;
}

extern long double infinityl() __attribute__((__alias__("infinity")));

These two declarations have a different type (not because of the 'long double', which is also 'double' in IR, but because infinityl has no (void) and is therefore a variadic function). This led to a crash in the bitcast which assumed address space 0.

Diff Detail

Event Timeline

aykevl created this revision.Nov 24 2022, 11:35 AM
aykevl requested review of this revision.Nov 24 2022, 11:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 24 2022, 11:35 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aykevl updated this revision to Diff 477827.Nov 24 2022, 11:35 AM
  • add CHECK: line that I forgot
aykevl updated this revision to Diff 477828.Nov 24 2022, 11:36 AM
  • now _actually_ add that CHECK line
This revision is now accepted and ready to land.Nov 24 2022, 12:59 PM