From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3811 invoked by alias); 6 Apr 2013 09:58:30 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 3731 invoked by uid 48); 6 Apr 2013 09:58:22 -0000 From: "mikpe at it dot uu.se" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/56851] Segmentation Error using -O3 optimization Date: Sat, 06 Apr 2013 09:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mikpe at it dot uu.se X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg00520.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56851 Mikael Pettersson changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mikpe at it dot uu.se --- Comment #1 from Mikael Pettersson 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 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=) at /tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:446 #6 ldist_gen (starting_vertices=0x12da6d0, rdg=0x1288840, loop=) at /tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:1142 #7 distribute_loop (stmts=, loop=) at /tmp/gcc-4.7-20130330/gcc/tree-loop-distribution.c:1228 #8 distribute_loop (loop=, stmts=) 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.