Created attachment 24592 [details] preprocessed source $ ./xgcc -v Using built-in specs. COLLECT_GCC=./xgcc Target: arm-unknown-linux-gnueabi Configured with: ../configure --target=arm-unknown-linux-gnueabi --prefix=/home/ryan/x-tools/arm-unknown-linux-gnueabi --with-sysroot=/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi//sys-root --disable-multilib --with-local-prefix=/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspace target_alias=arm-unknown-linux-gnueabi --enable-languages=c++ --disable-shared --disable-libmudflap --disable-libssp Thread model: posix gcc version 4.7.0 20110624 (experimental) [trunk revision 175378] (GCC) $ ./xgcc -B. ~/ice.i -c -O3 -g /home/ryan/ice.i: In function 'func4': /home/ryan/ice.i:38:1: internal compiler error: Floating point exception Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Doesn't crash without -g Program received signal SIGFPE, Arithmetic exception. validate_subreg (omode=VOIDmode, imode=SImode, reg=0x7ffff6e33a70, offset=0) at ../../gcc/emit-rtl.c:695 695 if (offset % osize != 0) (gdb) bt #0 validate_subreg (omode=VOIDmode, imode=SImode, reg=0x7ffff6e33a70, offset=0) at ../../gcc/emit-rtl.c:695 #1 0x0000000000616849 in gen_rtx_SUBREG (mode=VOIDmode, reg=0x7ffff6e33a70, offset=0) at ../../gcc/emit-rtl.c:775 #2 0x00000000005c82b8 in dead_debug_insert_before ( all_blocks=<value optimized out>) at ../../gcc/df-problems.c:3197 #3 df_note_bb_compute (all_blocks=<value optimized out>) at ../../gcc/df-problems.c:3399 #4 df_note_compute (all_blocks=<value optimized out>) at ../../gcc/df-problems.c:3452 #5 0x00000000005c14c9 in df_analyze_problem (dflow=0x144d220, blocks_to_consider=0x141de88, postorder=0x13fbb50, n_blocks=3) at ../../gcc/df-core.c:1152 #6 0x00000000005c1729 in df_analyze () at ../../gcc/df-core.c:1249 #7 0x0000000000c50dcb in sched_init () at ../../gcc/haifa-sched.c:3487 #8 0x0000000000c575cb in haifa_sched_init () at ../../gcc/haifa-sched.c:3526 #9 0x00000000008211f5 in schedule_insns () at ../../gcc/sched-rgn.c:3302 #10 0x00000000008217dd in rest_of_handle_sched2 () at ../../gcc/sched-rgn.c:3532 #11 0x00000000007c5b30 in execute_one_pass (pass=0x1252d20) at ../../gcc/passes.c:2059 ---Type <return> to continue, or q <return> to quit--- #12 0x00000000007c5e55 in execute_pass_list (pass=0x1252d20) at ../../gcc/passes.c:2114 #13 0x00000000007c5e67 in execute_pass_list (pass=0x1252300) at ../../gcc/passes.c:2115 #14 0x00000000007c5e67 in execute_pass_list (pass=0x12522a0) at ../../gcc/passes.c:2115 #15 0x00000000008cd728 in tree_rest_of_compilation (fndecl=0x7ffff7fa5100) at ../../gcc/tree-optimize.c:416 #16 0x00000000005a6546 in cgraph_expand_function (node=0x7ffff7f96480) at ../../gcc/cgraphunit.c:1792 #17 0x00000000005a82ea in cgraph_expand_all_functions () at ../../gcc/cgraphunit.c:1851 #18 cgraph_optimize () at ../../gcc/cgraphunit.c:2121 #19 0x00000000005a897a in cgraph_finalize_compilation_unit () at ../../gcc/cgraphunit.c:1292 #20 0x000000000049b4d8 in c_write_global_declarations () at ../../gcc/c-decl.c:9844 #21 0x000000000086ad66 in compile_file (argc=15, argv=0x7fffffffe0b8) at ../../gcc/toplev.c:571 #22 do_compile (argc=15, argv=0x7fffffffe0b8) at ../../gcc/toplev.c:1908 #23 toplev_main (argc=15, argv=0x7fffffffe0b8) at ../../gcc/toplev.c:1980 ---Type <return> to continue, or q <return> to quit--- #24 0x00007ffff718deff in __libc_start_main (main=0x52de00 <main>, argc=15, ubp_av=0x7fffffffe0b8, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fffffffe0a8) at libc-start.c:226 #25 0x000000000047f669 in _start ()
bt #0 0x08270d79 in validate_subreg (omode=VOIDmode, imode=SImode, reg=0xb7dae7e8, offset=0) at /home/ramrad01/sources/fsf/trunk/gcc/emit-rtl.c:695 #1 0x08270fa0 in gen_rtx_SUBREG (mode=VOIDmode, reg=0xb7dae7e8, offset=0) at /home/ramrad01/sources/fsf/trunk/gcc/emit-rtl.c:775 #2 0x08271027 in gen_lowpart_SUBREG (mode=VOIDmode, reg=0xb7dae7e8) at /home/ramrad01/sources/fsf/trunk/gcc/emit-rtl.c:790 #3 0x0821c879 in dead_debug_insert_before (all_blocks=0x8dc1364) at /home/ramrad01/sources/fsf/trunk/gcc/df-problems.c:3197 #4 df_note_bb_compute (all_blocks=0x8dc1364) at /home/ramrad01/sources/fsf/trunk/gcc/df-problems.c:3399 #5 df_note_compute (all_blocks=0x8dc1364) at /home/ramrad01/sources/fsf/trunk/gcc/df-problems.c:3452 #6 0x08215c16 in df_analyze_problem (dflow=0x8ddf078, blocks_to_consider=0x8dc1364, postorder=0x8dc6ad0, n_blocks=3) at /home/ramrad01/sources/fsf/trunk/gcc/df-core.c:1152 #7 0x08215e6b in df_analyze () at /home/ramrad01/sources/fsf/trunk/gcc/df-core.c:1249 #8 0x08919a8b in sched_init () at /home/ramrad01/sources/fsf/trunk/gcc/haifa-sched.c:3487 #9 0x08920472 in haifa_sched_init () at /home/ramrad01/sources/fsf/trunk/gcc/haifa-sched.c:3526 #10 0x084b87aa in schedule_insns () at /home/ramrad01/sources/fsf/trunk/gcc/sched-rgn.c:3302 #11 0x084b8e3d in rest_of_handle_sched2 () at /home/ramrad01/sources/fsf/trunk/gcc/sched-rgn.c:3532 #12 0x0845bb99 in execute_one_pass (pass=0x8c2fd20) at /home/ramrad01/sources/fsf/trunk/gcc/passes.c:2059 #13 0x0845becd in execute_pass_list (pass=0x8c2fd20) at /home/ramrad01/sources/fsf/trunk/gcc/passes.c:2114 #14 0x0845bee0 in execute_pass_list (pass=0x8c2f6a0) at /home/ramrad01/sources/fsf/trunk/gcc/passes.c:2115 #15 0x0845bee0 in execute_pass_list (pass=0x8c2f660) at /home/ramrad01/sources/fsf/trunk/gcc/passes.c:2115 #16 0x08575621 in tree_rest_of_compilation (fndecl=0xb7d71c00) at /home/ramrad01/sources/fsf/trunk/gcc/tree-optimize.c:416 #17 0x081f8482 in cgraph_expand_function (node=0xb7cfd668) at /home/ramrad01/sources/fsf/trunk/gcc/cgraphunit.c:1792 #18 0x081fa41d in cgraph_expand_all_functions () at /home/ramrad01/sources/fsf/trunk/gcc/cgraphunit.c:1851 #19 cgraph_optimize () at /home/ramrad01/sources/fsf/trunk/gcc/cgraphunit.c:2121 #20 0x081fab55 in cgraph_finalize_compilation_unit () at /home/ramrad01/sources/fsf/trunk/gcc/cgraphunit.c:1292 #21 0x080d4090 in c_write_global_declarations () at /home/ramrad01/sources/fsf/trunk/gcc/c-decl.c:9844 #22 0x08508bc4 in compile_file (argc=5, argv=0xbffff394) at /home/ramrad01/sources/fsf/trunk/gcc/toplev.c:571 #23 do_compile (argc=5, argv=0xbffff394) at /home/ramrad01/sources/fsf/trunk/gcc/toplev.c:1908 #24 toplev_main (argc=5, argv=0xbffff394) at /home/ramrad01/sources/fsf/trunk/gcc/toplev.c:1980 #25 0x081740cb in main (argc=5, argv=0xbffff394) at /home/ramrad01/sources/fsf/trunk/gcc/main.c:36 (gdb) It appears as though we are attempting to create a subreg of a clobber (const_int 0) . Ramana
Created attachment 24667 [details] gcc47-pr49522.patch Untested fix.
Author: jakub Date: Thu Jul 7 16:05:55 2011 New Revision: 175987 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175987 Log: PR debug/49522 * df-problems.c (dead_debug_reset): Remove dead_debug_uses referencing debug insns that have been reset. (dead_debug_insert_before): Don't assert reg is non-NULL, instead return immediately if it is NULL. * gcc.dg/debug/pr49522.c: New test. M gcc/ChangeLog A gcc/testsuite/gcc.dg/debug/pr49522.c M gcc/testsuite/ChangeLog M gcc/df-problems.c Added: trunk/gcc/testsuite/gcc.dg/debug/pr49522.c Modified: trunk/gcc/ChangeLog trunk/gcc/df-problems.c trunk/gcc/testsuite/ChangeLog
Author: jakub Date: Thu Jul 7 19:10:01 2011 New Revision: 176003 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176003 Log: PR debug/49522 * df-problems.c (dead_debug_reset): Remove dead_debug_uses referencing debug insns that have been reset. (dead_debug_insert_before): Don't assert reg is non-NULL, instead return immediately if it is NULL. * gcc.dg/debug/pr49522.c: New test. Added: branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/debug/pr49522.c Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/df-problems.c branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
Should be fixed now.