http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56851
Mikael Pettersson <mikpe at it dot uu.se> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpe at it dot uu.se
--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2013-04-06
09:58:19 UTC ---
Some important information was hidden in that attached zip file.
First, the target is arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb, with the host
being mingw32.
Second, the version is wrong; it's not 4.7.0 but ARM/embedded-4_7-branch
revision 196615 (I can't tell if it's vanilla or patched).
However, I can reproduce the cc1 SEGV in a cross from x86_64-linux to
arm-linux-gnueabi with gcc-4.7-20130330:
> /tmp/objdir/gcc/xgcc -B/tmp/objdir/gcc -mcpu=cortex-m3 -mthumb -O3 -S
> sensors.i
C:\Radio Control\OpenAero32\src\sensors.c: In function 'ACC_getADC':
C:\Radio Control\OpenAero32\src\sensors.c:251:6: 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.
Re-running under gdb shows:
Program received signal SIGSEGV, Segmentation fault.
0x00000000007f5baf in rename_use_op (op_p=0x7ffff7611330) at
/tmp/gcc-4.7-20130330/gcc/tree-vect-loop-manip.c:55
55 if (TREE_CODE (USE_FROM_PTR (op_p)) != SSA_NAME)
Missing separate debuginfos, use: debuginfo-install glibc-2.15-58.fc17.x86_64
(gdb) bt
#0 0x00000000007f5baf in rename_use_op (op_p=0x7ffff7611330) at
/tmp/gcc-4.7-20130330/gcc/tree-vect-loop-manip.c:55
#1 rename_variables_in_bb (bb=0x7ffff76103a8) at
/tmp/gcc-4.7-20130330/gcc/tree-vect-loop-manip.c:95
#2 0x00000000007f5bee in rename_variables_in_loop (loop=0x7ffff7551440) at
/tmp/gcc-4.7-20130330/gcc/tree-vect-loop-manip.c:111
#3 0x00000000007155aa in copy_loop_before (loop=0x7ffff7551330) at
/tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:182
#4 generate_loops_for_partition (copy_p=1 '\001', partition=0x12c4e30,
loop=0x7ffff7551330) at /tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:216
#5 generate_code_for_partition (copy_p=1 '\001', partition=0x12c4e30,
loop=<optimized out>) at /tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:446
#6 ldist_gen (starting_vertices=0x12da6d0, rdg=0x1288840, loop=<optimized
out>) at /tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:1142
#7 distribute_loop (stmts=<optimized out>, loop=<optimized out>) at
/tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:1228
#8 distribute_loop (loop=<optimized out>, stmts=<optimized out>) at
/tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:1170
#9 0x0000000000715b8d in tree_loop_distribution () at
/tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:1284
#10 0x0000000000646f53 in execute_one_pass (pass=0x108ee20) at
/tmp/gcc-4.7-20130330/gcc/passes.c:2084
#11 0x0000000000647265 in execute_pass_list (pass=0x108ee20) at
/tmp/gcc-4.7-20130330/gcc/passes.c:2139
#12 0x0000000000647277 in execute_pass_list (pass=0x108ff00) at
/tmp/gcc-4.7-20130330/gcc/passes.c:2140
#13 0x0000000000647277 in execute_pass_list (pass=0x108f180) at
/tmp/gcc-4.7-20130330/gcc/passes.c:2140
#14 0x000000000071cd16 in tree_rest_of_compilation (fndecl=0x7ffff749c300) at
/tmp/gcc-4.7-20130330/gcc/tree-optimize.c:422
#15 0x00000000004d1aba in cgraph_expand_function (node=0x7ffff77a26c0) at
/tmp/gcc-4.7-20130330/gcc/cgraphunit.c:1837
#16 0x00000000004d320a in cgraph_expand_all_functions () at
/tmp/gcc-4.7-20130330/gcc/cgraphunit.c:1904
#17 cgraph_optimize () at /tmp/gcc-4.7-20130330/gcc/cgraphunit.c:2218
#18 0x00000000004d371a in cgraph_finalize_compilation_unit () at
/tmp/gcc-4.7-20130330/gcc/cgraphunit.c:1344
#19 0x00000000004195a0 in c_write_global_declarations () at
/tmp/gcc-4.7-20130330/gcc/c-decl.c:10032
#20 0x00000000006d73a1 in compile_file () at
/tmp/gcc-4.7-20130330/gcc/toplev.c:573
#21 do_compile () at /tmp/gcc-4.7-20130330/gcc/toplev.c:1929
#22 toplev_main (argc=15, argv=0x7fffffffdae8) at
/tmp/gcc-4.7-20130330/gcc/toplev.c:2005
#23 0x00007ffff7a47735 in __libc_start_main () from /lib64/libc.so.6
#24 0x0000000000408861 in _start ()
gcc 4.8-20130404 and 4.6-20130405 both successfully compile this test case.