ICE using va_list with -g -femit-struct-debug-baseonly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GCC |
Fix Released
|
Medium
|
Yao Qi | ||
gcc |
Confirmed
|
Medium
|
Bug Description
Doing test kernel builds with arm-linux-
I could not build with '-g -femit-
arnd@ocdc-kvm:/tmp$ echo 'typedef __builtin_va_list x;' > test.c
arnd@ocdc-kvm:/tmp$ arm-linux-
test.c:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:/
Not sure if the bug requires __builtin_va_list, since I was not able to anything complex without including stdarg.h.
Related branches
- Andrew Stubbs (community): Approve
-
Diff: 42 lines (+19/-0)3 files modifiedChangeLog.linaro (+15/-0)
gcc/config/arm/arm.c (+1/-0)
gcc/testsuite/gcc.target/arm/pr45447.c (+3/-0)
tags: | added: ice |
Changed in gcc-linaro: | |
assignee: | nobody → Yao Qi (yao-codesourcery) |
Changed in gcc-linaro: | |
status: | New → In Progress |
Changed in gcc-linaro: | |
importance: | Undecided → Medium |
milestone: | none → 4.4-2010.11-0 |
Changed in gcc-linaro: | |
status: | In Progress → Fix Committed |
Changed in gcc-linaro: | |
status: | Fix Committed → Fix Released |
Changed in gcc-linaro: | |
milestone: | 4.4-2010.11-0 → 4.5-2010.11-0 |
Changed in gcc: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
the following test-case:
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
typedef __builtin_va_list __gnuc_va_list;
#endif
triggers the following ICE:
% /arm-none- linux-eabi/ libexec/ gcc/arm- none-linux- eabi/4. 5.2/cc1 -v ./test-case.c -g -femit- struct- debug-baseonly -o ./test-case.o linux-eabi/ arm-none- linux-eabi/ /sys-root/ x-tools/ arm-none- linux-eabi/ arm-none- linux-eabi/ /sys-root/ include" src/toolchain/ build/x- tools/arm- none-linux- eabi/arm- none-linux- eabi//sys- root/usr/ include" linux-eabi/ lib/gcc/ arm-none- linux-eabi/ 4.5.2/include linux-eabi/ lib/gcc/ arm-none- linux-eabi/ 4.5.2/include- fixed linux-eabi/ lib/gcc/ arm-none- linux-eabi/ 4.5.2/. ./../.. /../arm- none-linux- abi/include linux-eabi/ lib/gcc/ arm-none- linux-eabi/ 4.5.2/include/ stdarg. h:40:1: internal compiler error: Segmentation fault gcc.gnu. org/bugs. html> for instructions.
ignoring nonexistent directory "/arm-none-
ignoring duplicate directory "/data/
#include "..." search starts here:
#include <...> search starts here:
/arm-none-
/arm-none-
/arm-none-
End of search list.
In file included from ./test-case.c:1:0:
/arm-none-
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://
The stack trace is the following:
Program received signal SIGSEGV, Segmentation fault. emit_struct_ debug () emit_struct_ debug () or_union_ type_die () die_with_ usage () decl_compilatio n () declaration_ or_fndef () external_ declaration () translation_ unit ()
0x08358433 in should_
Current language: auto; currently asm
#0 0x08358433 in should_
#1 0x08201a26 in gen_struct_
#2 0x08202338 in gen_type_
#3 0x08202390 in gen_type_die ()
#4 0x081f3f0f in modified_type_die ()
#5 0x081fda5f in add_type_attribute ()
#6 0x08201ed4 in gen_typedef_die ()
#7 0x08202fe6 in gen_decl_die ()
#8 0x08203916 in dwarf2out_decl ()
#9 0x08203324 in dwarf2out_type_decl ()
#10 0x0835bd65 in rest_of_
#11 0x080d265c in finish_decl ()
#12 0x08133677 in c_parser_
#13 0x08133153 in c_parser_
#14 0x08132e08 in c_parser_
#15 0x08141d23 in c_parse_file ()
#16 0x08126063 in c_common_parse_file ()
#17 0x08426ae9 in compile_file ()
#18 0x08428973 in do_compile ()
#19 0x08428a38 in toplev_main ()
#20 0x0814a172 in main ()
dump of should_ emit_struct_ debug() : emit_struct_ debug+101> : lea -0x1c(%ebp),%edx emit_struct_ debug+104> : mov %eax,0x4(%esp) emit_struct_ debug+108> : mov %edx,(%esp) emit_struct_ debug+111> : call 0x8581c07 <expand_location> emit_struct_ debug+116> : sub $0x4,%esp emit_struct_ debug+119> : movzbl -0x10(%ebp),%eax emit_struct_ debug+123> : test %al,%al emit_struct_ debug+125> : je 0x8358430 <should_ emit_struct_ debug+133> emit_struct_ debug+127> : movb $0x1,-0x31(%ebp) emit_struct_ debug+131> : jmp 0x8358461 <should_ emit_struct_ debug+182> emit_struct_ debug+133> : mov -0xc(%ebp),%eax emit_struct_ debug+136> : mov 0x10(%eax),%ea...
0x08358410 <should_
0x08358413 <should_
0x08358417 <should_
0x0835841a <should_
0x0835841f <should_
0x08358422 <should_
0x08358426 <should_
0x08358428 <should_
0x0835842a <should_
0x0835842e <should_
0x08358430 <should_
0x08358433 <should_