Comment 14 for bug 731665

Revision history for this message
Michael Hope (michaelh1) wrote :

I can reproduce this on a native gcc-linaro-4.5-2011.03-0 built on the powerpc host 'davis':

(natty)michaelh@davis:~/linaro/gcc/build/gcc$ ./xgcc -B $PWD -m64 -O2 -fno-strict-aliasing -fno-common -fno-delete-null-pointer-checks -msoft-float -mminimal-toc -mtraceback=none -mcall-aixdesc -mtune=power4 -mno-altivec -mno-string -mno-sched-epilog -Wa,-maltivec -S ~/bounds.i
/home/apw/build/ubuntu-natty/ubuntu-natty/kernel/bounds.c: In function 'foo':
/home/apw/build/ubuntu-natty/ubuntu-natty/kernel/bounds.c:19:1: internal compiler error: Segmentation fault

Running gdb on cc1 shows:

(natty)michaelh@davis:~/linaro/gcc/build/gcc$ gdb --args ./cc1 -fpreprocessed /home/michaelh/bounds.i -mbig -msecure-plt -quiet -dumpbase bounds.i -m64 -msoft-float -mminimal-toc -mtraceback=none -mcall-aixdesc -mtune=power4 -mno-altivec -mno-string -mno-sched-epilog -auxbase bounds -O2 -version -fno-strict-aliasing -fno-common -fno-delete-null-pointer-checks -o bounds.s

GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/michaelh/linaro/gcc/build/gcc/cc1...done.
Breakpoint 1 at 0x10203324: file ../../gcc-linaro-4.5-2011.03-0/gcc/diagnostic.c, line 763.
Breakpoint 2 at 0x10203130: file ../../gcc-linaro-4.5-2011.03-0/gcc/diagnostic.c, line 703.
Breakpoint 3 at 0x10c44b30
Breakpoint 4 at 0x10c44ef0

(gdb) r

Starting program: /home/michaelh/linaro/gcc/build/gcc/cc1 -fpreprocessed /home/michaelh/bounds.i -mbig -msecure-plt -quiet -dumpbase bounds.i -m64 -msoft-float -mminimal-toc -mtraceback=none -mcall-aixdesc -mtune=power4 -mno-altivec -mno-string -mno-sched-epilog -auxbase bounds -O2 -version -fno-strict-aliasing -fno-common -fno-delete-null-pointer-checks -o bounds.s
GNU C (Linaro GCC 4.5-2011.03-0) version 4.5.3 20110221 (prerelease) (powerpc-linux-gnu)
 compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (Linaro GCC 4.5-2011.03-0) version 4.5.3 20110221 (prerelease) (powerpc-linux-gnu)
 compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 4925f8161c97812c1a112f99f2c6393c

Program received signal SIGSEGV, Segmentation fault.
0x1025cc5c in emit_insn (x=0x1) at ../../gcc-linaro-4.5-2011.03-0/gcc/emit-rtl.c:4863
4863 switch (GET_CODE (x))

(gdb) back

#0 0x1025cc5c in emit_insn (x=0x1) at ../../gcc-linaro-4.5-2011.03-0/gcc/emit-rtl.c:4863
#1 0x101bae6c in insert_insn_on_edge (pattern=0x1, e=0xf7f675a0) at ../../gcc-linaro-4.5-2011.03-0/gcc/cfgrtl.c:1469
#2 0x103241e8 in thread_prologue_and_epilogue_insns () at ../../gcc-linaro-4.5-2011.03-0/gcc/function.c:5354
#3 0x103258a0 in rest_of_handle_thread_prologue_and_epilogue () at ../../gcc-linaro-4.5-2011.03-0/gcc/function.c:5984
#4 0x10445620 in execute_one_pass (pass=0x10eeddc0) at ../../gcc-linaro-4.5-2011.03-0/gcc/passes.c:1572
#5 0x10445904 in execute_pass_list (pass=0x10eeddc0) at ../../gcc-linaro-4.5-2011.03-0/gcc/passes.c:1627
#6 0x10445938 in execute_pass_list (pass=0x10f2b954) at ../../gcc-linaro-4.5-2011.03-0/gcc/passes.c:1628
#7 0x10445938 in execute_pass_list (pass=0x10f2b920) at ../../gcc-linaro-4.5-2011.03-0/gcc/passes.c:1628
#8 0x105fed9c in tree_rest_of_compilation (fndecl=0xf7f51d00) at ../../gcc-linaro-4.5-2011.03-0/gcc/tree-optimize.c:413
#9 0x1084575c in cgraph_expand_function (node=0xf7ed5510) at ../../gcc-linaro-4.5-2011.03-0/gcc/cgraphunit.c:1574
#10 0x10845b00 in cgraph_expand_all_functions () at ../../gcc-linaro-4.5-2011.03-0/gcc/cgraphunit.c:1653
#11 0x108464b0 in cgraph_optimize () at ../../gcc-linaro-4.5-2011.03-0/gcc/cgraphunit.c:1909
#12 0x1084447c in cgraph_finalize_compilation_unit () at ../../gcc-linaro-4.5-2011.03-0/gcc/cgraphunit.c:1122
#13 0x1008b39c in c_write_global_declarations () at ../../gcc-linaro-4.5-2011.03-0/gcc/c-decl.c:9520
#14 0x1057fc70 in compile_file () at ../../gcc-linaro-4.5-2011.03-0/gcc/toplev.c:1065
#15 0x10583190 in do_compile () at ../../gcc-linaro-4.5-2011.03-0/gcc/toplev.c:2424
#16 0x105832cc in toplev_main (argc=26, argv=0xffffe634) at ../../gcc-linaro-4.5-2011.03-0/gcc/toplev.c:2466
#17 0x101295e4 in main (argc=26, argv=0xffffe634) at ../../gcc-linaro-4.5-2011.03-0/gcc/main.c:35