Bug 87695 - Arduino: ICE with avr and LTO
Summary: Arduino: ICE with avr and LTO
Status: WAITING
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 5.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: bugurl, lto
: 87771 88230 88468 88665 89918 90286 90429 90956 91703 91810 91904 93204 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-10-22 20:06 UTC by MarcoG
Modified: 2021-05-30 09:56 UTC (History)
18 users (show)

See Also:
Host:
Target: avr
Build:
Known to work:
Known to fail:
Last reconfirmed: 2018-10-23 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MarcoG 2018-10-22 20:06:45 UTC
what does this message want to tell me?

Arduino: 1.8.7 (Windows Store 1.8.15.0) (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\SAMAMOFA\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10807 -build-path C:\Users\SAMAMOFA\AppData\Local\Temp\arduino_build_439479 -warnings=none -build-cache C:\Users\SAMAMOFA\AppData\Local\Temp\arduino_cache_930089 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -verbose C:\Users\SAMAMOFA\Documents\Arduino\Lokschuppen4Tore_Servo_Taster_LED\Lokschuppen4Tore_Servo_Taster_LED.ino
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\arduino-builder -compile -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\SAMAMOFA\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10807 -build-path C:\Users\SAMAMOFA\AppData\Local\Temp\arduino_build_439479 -warnings=none -build-cache C:\Users\SAMAMOFA\AppData\Local\Temp\arduino_cache_930089 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr -verbose C:\Users\SAMAMOFA\Documents\Arduino\Lokschuppen4Tore_Servo_Taster_LED\Lokschuppen4Tore_Servo_Taster_LED.ino
Using board 'mega' from platform in folder: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\arduino\avr
Detecting libraries used...
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10807 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\variants\\mega" "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479\\sketch\\Lokschuppen4Tore_Servo_Taster_LED.ino.cpp" -o nul
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10807 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\variants\\mega" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\libraries\\Servo\\src" "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479\\sketch\\Lokschuppen4Tore_Servo_Taster_LED.ino.cpp" -o nul
Using cached library dependencies for file: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\libraries\Servo\src\avr\Servo.cpp
Using cached library dependencies for file: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\libraries\Servo\src\nrf52\Servo.cpp
Using cached library dependencies for file: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\libraries\Servo\src\sam\Servo.cpp
Using cached library dependencies for file: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\libraries\Servo\src\samd\Servo.cpp
Using cached library dependencies for file: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\libraries\Servo\src\stm32f4\Servo.cpp
Generating function prototypes...
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10807 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\variants\\mega" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\libraries\\Servo\\src" "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479\\sketch\\Lokschuppen4Tore_Servo_Taster_LED.ino.cpp" -o "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Sketch wird kompiliert...
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10807 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\variants\\mega" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\libraries\\Servo\\src" "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479\\sketch\\Lokschuppen4Tore_Servo_Taster_LED.ino.cpp" -o "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479\\sketch\\Lokschuppen4Tore_Servo_Taster_LED.ino.cpp.o"
Compiling libraries...
Compiling library "Servo"
Zuvor kompilierte Datei wird verwendet: C:\Users\SAMAMOFA\AppData\Local\Temp\arduino_build_439479\libraries\Servo\avr\Servo.cpp.o
Zuvor kompilierte Datei wird verwendet: C:\Users\SAMAMOFA\AppData\Local\Temp\arduino_build_439479\libraries\Servo\nrf52\Servo.cpp.o
Zuvor kompilierte Datei wird verwendet: C:\Users\SAMAMOFA\AppData\Local\Temp\arduino_build_439479\libraries\Servo\sam\Servo.cpp.o
Zuvor kompilierte Datei wird verwendet: C:\Users\SAMAMOFA\AppData\Local\Temp\arduino_build_439479\libraries\Servo\samd\Servo.cpp.o
Zuvor kompilierte Datei wird verwendet: C:\Users\SAMAMOFA\AppData\Local\Temp\arduino_build_439479\libraries\Servo\stm32f4\Servo.cpp.o
Compiling core...
Using precompiled core: C:\Users\SAMAMOFA\AppData\Local\Temp\arduino_cache_930089\core\core_arduino_avr_mega_cpu_atmega2560_83dd9225a3a2a4e5654b35f3e742d65a.a
Linking everything together...
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections,--relax -mmcu=atmega2560 -o "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479/Lokschuppen4Tore_Servo_Taster_LED.ino.elf" "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479\\sketch\\Lokschuppen4Tore_Servo_Taster_LED.ino.cpp.o" "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479\\libraries\\Servo\\avr\\Servo.cpp.o" "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479\\libraries\\Servo\\nrf52\\Servo.cpp.o" "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479\\libraries\\Servo\\sam\\Servo.cpp.o" "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479\\libraries\\Servo\\samd\\Servo.cpp.o" "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479\\libraries\\Servo\\stm32f4\\Servo.cpp.o" "C:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479/..\\arduino_cache_930089\\core\\core_arduino_avr_mega_cpu_atmega2560_83dd9225a3a2a4e5654b35f3e742d65a.a" "-LC:\\Users\\SAMAMOFA\\AppData\\Local\\Temp\\arduino_build_439479" -lm
In function 'global constructors keyed to 65535_0_Lokschuppen4Tore_Servo_Taster_LED.ino.cpp.o':

lto1.exe: internal compiler error: Segmentation fault

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\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.15.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

Bibliothek Servo in Version 1.1.2 im Ordner: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\libraries\Servo  wird verwendet
exit status 1
Fehler beim Kompilieren für das Board Arduino/Genuino Mega or Mega 2560.

Thank you
Comment 1 Richard Biener 2018-10-23 07:11:30 UTC
The compiler segfaulted.

Note that GCC 5.4 is no longer maintained, esp. for using link-time optimization you should try newer toolchains using GCC 7 or GCC 8.

In any case to debug your issue you need to follow https://gcc.gnu.org/bugs.html
and provide a testcase in the form of preprocessed sources.
Comment 2 Andrew Pinski 2018-11-18 00:17:58 UTC
*** Bug 87771 has been marked as a duplicate of this bug. ***
Comment 3 Donna Ory 2018-11-18 14:22:41 UTC
Sooo...what does that mean?
Do I still have a 3D printer that won't print because the problem lies with the so called original program that I'm just trying to put back in it?
Comment 4 Andrew Pinski 2018-11-27 21:39:53 UTC
*** Bug 88230 has been marked as a duplicate of this bug. ***
Comment 5 Eric Gallager 2018-11-28 15:47:01 UTC
(In reply to Donna Ory from comment #3)
> Sooo...what does that mean?
> Do I still have a 3D printer that won't print because the problem lies with
> the so called original program that I'm just trying to put back in it?

It means that there's still disagreement as to whose responsibility this bug is exactly (Arduino's, Atmel's, MicrochipTech's, or someone else's). cc-ing AVR maintainers to see if they know who in the AVR/Arduino community might be the right person to talk to about this.
Comment 6 Andrew Pinski 2018-12-16 07:54:14 UTC
*** Bug 88468 has been marked as a duplicate of this bug. ***
Comment 7 Andrew Pinski 2019-01-02 21:35:55 UTC
*** Bug 88665 has been marked as a duplicate of this bug. ***
Comment 8 Andrew Pinski 2019-04-01 22:30:23 UTC
*** Bug 89918 has been marked as a duplicate of this bug. ***
Comment 9 Eric Gallager 2019-04-02 05:02:23 UTC
(In reply to Eric Gallager from comment #5)
> (In reply to Donna Ory from comment #3)
> > Sooo...what does that mean?
> > Do I still have a 3D printer that won't print because the problem lies with
> > the so called original program that I'm just trying to put back in it?
> 
> It means that there's still disagreement as to whose responsibility this bug
> is exactly (Arduino's, Atmel's, MicrochipTech's, or someone else's). cc-ing
> AVR maintainers to see if they know who in the AVR/Arduino community might
> be the right person to talk to about this.

Someone from Arduino says it's MicroChipTech's problem: 

https://twitter.com/gvarisco/status/1067800978999660544

More people need to tell them to configure with the --with-bugurl= flag (besides just me) so we stop getting these reports.
Comment 10 Andrew Pinski 2019-04-29 20:31:54 UTC
*** Bug 90286 has been marked as a duplicate of this bug. ***
Comment 11 Andrew Pinski 2019-05-10 20:09:17 UTC
*** Bug 90429 has been marked as a duplicate of this bug. ***
Comment 12 Andrew Pinski 2019-06-23 22:35:45 UTC
*** Bug 90956 has been marked as a duplicate of this bug. ***
Comment 13 OC 2019-07-14 07:44:35 UTC
Hi,
This bug is open for almost 9 months. I loaded the latest GCC revision and it is not solved. Can anyone be so kind to give an estimation of repair time or any work around?
Comment 14 Andreas Schwab 2019-07-14 08:08:12 UTC
Since you know how to reproduce the issue, you can help by providing the requested information.
Comment 15 Eric Gallager 2019-09-25 16:12:13 UTC
*** Bug 91904 has been marked as a duplicate of this bug. ***
Comment 16 Andrew Pinski 2020-01-09 05:36:10 UTC
*** Bug 93204 has been marked as a duplicate of this bug. ***
Comment 17 Andrew Pinski 2020-01-09 05:36:38 UTC
*** Bug 91703 has been marked as a duplicate of this bug. ***
Comment 18 Georg-Johann Lay 2020-01-09 12:59:09 UTC
I am inclined to close all these PRs as invalid because there is still no valid bug report, i.e. none of the reports enabled us to reproduce the issue AND it is against a version no more supported (the 1st report was actually filed 1 1/2 years after v5 support ended) AND we were not able to find out whether the problems are due to changes introduced by the distributor.

Please report this problems to Microchip.  Maybe someone knows the correct bug URL to report this to Microchip and can it post here.  Thanks.
Comment 19 Eric Gallager 2020-05-22 18:31:54 UTC
cc-ing Senthil Kumar since apparently he's at Microchip and still working on AVR stuff: https://gcc.gnu.org/pipermail/gcc/2020-April/000412.html
Comment 20 Eric Gallager 2020-12-07 23:12:02 UTC
redoing some CCs that mysteriously disappeared without being reported as being "removed" in the bug history
Comment 21 Andrew Pinski 2021-05-30 03:56:51 UTC
*** Bug 91810 has been marked as a duplicate of this bug. ***