Skip to content

AVR core 1.6.23 (IDE 1.8.7) LTO + debugger symbols crash #55

@ImpulseAdventure

Description

@ImpulseAdventure

Hi --

I am encountering an internal compiler error in the latest Arduino AVR core (1.6.23) with IDE 1.8.7.

After much debugging, it appears to be related to the inclusion of the debugger symbols (-g) flag in the avr-gcc call (perhaps with LTO concurrently enabled).

Testcase

To help others reproduce the issue, I have created an isolated testcase:

Error Output

The output was generated from the following setup:

  • Arduino IDE: 1.8.7 on Windows 10
  • Board Package: Arduino AVR Boards 1.6.23
  • Board: Arduino UNO
Linking everything together...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Cal\\AppData\\Local\\Temp\\arduino_build_528560/test-lto.ino.elf" "C:\\Users\\Cal\\AppData\\Local\\Temp\\arduino_build_528560\\sketch\\MyLib.c.o" "C:\\Users\\Cal\\AppData\\Local\\Temp\\arduino_build_528560\\sketch\\test-lto.ino.cpp.o" "C:\\Users\\Cal\\AppData\\Local\\Temp\\arduino_build_528560/core\\core.a" "-LC:\\Users\\Cal\\AppData\\Local\\Temp\\arduino_build_528560" -lm

lto1.exe: internal compiler error: in splice_child_die, at dwarf2out.c:4905
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper.exe: fatal error: C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc returned 1 exit status

Other Test Results

Arduino IDE Arduino AVR Boards Extra Mods Result
1.8.7 1.6.23 Fail
1.8.7 1.6.22 Fail
1.8.7 1.6.21 OK
1.8.5 OK
1.8.7 1.6.23 Disable -g OK
  • In the last test case, debugger symbol generation was disabled by removing the -g flag from platform.txt: compiler.c.flags.

Related Issues

Please let me know if further details may help root-cause the issue.

Thank you for your time,
Cal

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions