% /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
ignoring nonexistent directory "/arm-none-linux-eabi/arm-none-linux-eabi//sys-root/x-tools/arm-none-linux-eabi/arm-none-linux-eabi//sys-root/include"
ignoring duplicate directory "/data/src/toolchain/build/x-tools/arm-none-linux-eabi/arm-none-linux-eabi//sys-root/usr/include"
#include "..." search starts here:
#include <...> search starts here:
/arm-none-linux-eabi/lib/gcc/arm-none-linux-eabi/4.5.2/include
/arm-none-linux-eabi/lib/gcc/arm-none-linux-eabi/4.5.2/include-fixed
/arm-none-linux-eabi/lib/gcc/arm-none-linux-eabi/4.5.2/../../../../arm-none-linux-abi/include
End of search list.
In file included from ./test-case.c:1:0:
/arm-none-linux-eabi/lib/gcc/arm-none-linux-eabi/4.5.2/include/stdarg.h:40:1: 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.
The stack trace is the following:
Program received signal SIGSEGV, Segmentation fault.
0x08358433 in should_emit_struct_debug ()
Current language: auto; currently asm
#0 0x08358433 in should_emit_struct_debug ()
#1 0x08201a26 in gen_struct_or_union_type_die ()
#2 0x08202338 in gen_type_die_with_usage ()
#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_decl_compilation ()
#11 0x080d265c in finish_decl ()
#12 0x08133677 in c_parser_declaration_or_fndef ()
#13 0x08133153 in c_parser_external_declaration ()
#14 0x08132e08 in c_parser_translation_unit ()
#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 ()
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),%eax emit_struct_ debug+139> : lea -0x2c(%ebp),%edx emit_struct_ debug+142> : mov %eax,0x4(%esp) emit_struct_ debug+146> : mov %edx,(%esp) emit_struct_ debug+149> : call 0x8581c07 <expand_location> emit_struct_ debug+154> : sub $0x4,%esp emit_struct_ debug+157> : mov -0x2c(%ebp),%eax emit_struct_ debug+160> : mov %eax,(%esp) emit_struct_ debug+163> : call 0x8358335 <matches_main_base> emit_struct_ debug+168> : test %eax,%eax emit_struct_ debug+170> : je 0x835845d <should_ emit_struct_ debug+178> emit_struct_ debug+172> : movb $0x1,-0x31(%ebp) emit_struct_ debug+176> : jmp 0x8358461 <should_ emit_struct_ debug+182> emit_struct_ debug+178> : movb $0x0,-0x31(%ebp) emit_struct_ debug+182> : movzbl -0x31(%ebp),%eax emit_struct_ debug+186> : leave emit_struct_ debug+187> : ret
0x08358410 <should_
0x08358413 <should_
0x08358417 <should_
0x0835841a <should_
0x0835841f <should_
0x08358422 <should_
0x08358426 <should_
0x08358428 <should_
0x0835842a <should_
0x0835842e <should_
0x08358430 <should_
0x08358433 <should_
^^^ crash above ^^^
0x08358436 <should_
0x08358439 <should_
0x0835843d <should_
0x08358440 <should_
0x08358445 <should_
0x08358448 <should_
0x0835844b <should_
0x0835844e <should_
0x08358453 <should_
0x08358455 <should_
0x08358457 <should_
0x0835845b <should_
0x0835845d <should_
0x08358461 <should_
0x08358465 <should_
0x08358466 <should_
and registers:
(gdb) info registers
eax 0x0 0
[...]
C source matching is left to the reader :)
In case that help, this compiler was build with the latest GMP/MPC/MPFR.
Compilers from the same code tree, but built for PowerPC or Sparc target, run fine.