http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50635
Bug #: 50635 Summary: ICE on invalid code: segfault in vectorize_loops Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: greta.yo...@arm.com Target: arm-none-eabi Created attachment 25431 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25431 small_ice.c arm-none-eabi/gcc2/gcc/cc1 small_ice.c -O3 -quiet -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=neon small_ice.c: In function 'f0a': small_ice.c:5:6: internal compiler error: Segmentation fault Trace: #0 flow_bb_inside_loop_p (loop=0x7ffff7436f68, bb=0x0) at /work/local-checkouts/main/gcc-fsf/gcc/cfgloop.c:776 #1 0x00000000009ef6ef in vect_is_simple_use (operand=0x7ffff74bfaa0, loop_vinfo=<value optimised out>, bb_vinfo=0x0, def_stmt=0x7fffffffe008, def=0x7fffffffe010, dt=0x7fffffffe01c) at /work/local-checkouts/main/gcc-fsf/gcc/tree-vect-stmts.c:5595 #2 0x00000000009f93dc in process_use (stmt=0x7ffff74b7580, use=0x7ffff74bfaa0, loop_vinfo=0x15077a0, live_p=<value optimised out>, relevant=vect_used_in_scope, worklist=<value optimised out>) at /work/local-checkouts/main/gcc-fsf/gcc/tree-vect-stmts.c:368 #3 0x00000000009f9e69 in vect_mark_stmts_to_be_vectorized (loop_vinfo=0x15077a0) at /work/local-checkouts/main/gcc-fsf/gcc/tree-vect-stmts.c:658 #4 0x0000000000a0bae1 in vect_analyze_loop_2 (loop=0x7ffff7436f68) at /work/local-checkouts/main/gcc-fsf/gcc/tree-vect-loop.c:1504 #5 vect_analyze_loop (loop=0x7ffff7436f68) at /work/local-checkouts/main/gcc-fsf/gcc/tree-vect-loop.c:1650 #6 0x0000000000a18e4e in vectorize_loops () at /work/local-checkouts/main/gcc-fsf/gcc/tree-vectorizer.c:203 #7 0x00000000007d7859 in execute_one_pass (pass=0x129b760) at /work/local-checkouts/main/gcc-fsf/gcc/passes.c:2064 #8 0x00000000007d7bd5 in execute_pass_list (pass=0x129b760) at /work/local-checkouts/main/gcc-fsf/gcc/passes.c:2119 #9 0x00000000007d7be7 in execute_pass_list (pass=0x129b580) at /work/local-checkouts/main/gcc-fsf/gcc/passes.c:2120 #10 0x00000000007d7be7 in execute_pass_list (pass=0x129ac80) at /work/local-checkouts/main/gcc-fsf/gcc/passes.c:2120 #11 0x00000000008deca8 in tree_rest_of_compilation (fndecl=0x7ffff7437400) at /work/local-checkouts/main/gcc-fsf/gcc/tree-optimize.c:420 #12 0x00000000005c09ce in cgraph_expand_function (node=0x7ffff75a4120) at /work/local-checkouts/main/gcc-fsf/gcc/cgraphunit.c:1805 #13 0x00000000005c3fca in cgraph_expand_all_functions () at /work/local-checkouts/main/gcc-fsf/gcc/cgraphunit.c:1864 #14 cgraph_optimize () at /work/local-checkouts/main/gcc-fsf/gcc/cgraphunit.c:2141 #15 0x00000000005c44ea in cgraph_finalize_compilation_unit () at /work/local-checkouts/main/gcc-fsf/gcc/cgraphunit.c:1312 #16 0x00000000004a6e08 in c_write_global_declarations () at /work/local-checkouts/main/gcc-fsf/gcc/c-decl.c:9936 #17 0x000000000087bcca in compile_file (argc=7, argv=0x7fffffffe4b8) at /work/local-checkouts/main/gcc-fsf/gcc/toplev.c:581 #18 do_compile (argc=7, argv=0x7fffffffe4b8) at /work/local-checkouts/main/gcc-fsf/gcc/toplev.c:1925 #19 toplev_main (argc=7, argv=0x7fffffffe4b8) at /work/local-checkouts/main/gcc-fsf/gcc/toplev.c:2001 #20 0x00007ffff7874c4d in __libc_start_main () from /lib/libc.so.6 #21 0x0000000000496da9 in _start () ICE does not occur without "-mfloat-abi=softfp -mfpu=neon". This ICE happens with trunk version of end of August 2011 and perhaps earlier. It does not appear in gcc4.6. The code is invalid because uninitialized variable temp_3 is used.