[llvm] [AVR] Fix a crash in AVRInstrInfo::insertIndirectBranch (PR #67324)

Ben Shi via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 05:04:57 PDT 2023


benshi001 wrote:

> This seems like a reasonable solution. The only thing I'm worried about is what the linker will actually do. Will it report an out of range error? Do we have tests for this?

With the attached b.s, an linker error is reported as
```
benshi at BENNSHI-MB0 /tmp % /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc b.s -O3 -Wall -mmcu=attiny85
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld: a.out section `.text' will not fit in region `text'
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld: region `text' overflowed by 614 bytes
collect2: error: ld returned 1 exit status
```

https://github.com/llvm/llvm-project/pull/67324


More information about the llvm-commits mailing list