LTO causes internal compiler error (segmentation fault)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
I encountered a bug that causes a segmentation fault of the the compiler during linker stage.
I tried to setup a minimal example that triggers the error, but I still need multiple files so the linker does something. Hence, I have attached all files as zip archive (5 source files with about 40 loc in total, a 6-line Makefile, and a table with some test results).
Compiling the code using the command in the Makefile results in the following error message:
In function '_GLOBAL_
lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://
lto-wrapper: fatal error: arm-none-eabi-gcc returned 1 exit status
compilation terminated.
/home/juser/
collect2: error: ld returned 1 exit status
As you can see in the table, the issue occurs since the first GCC 4.9 release. Furthermore, the issue is gone when any of the compiler options (-flto, -O2, -fstack-usage) is removed.
I am aware that the given code example does not make any sense, but it is just the minimum configuration I could extract from my project. In any case, the compiler should throw warnings or errors, but no segmentation fault.
Please let me know if you can reproduce the error or if you need further information.
tags: | added: ice |