https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68459
Bug ID: 68459 Summary: ICE when compiling for alpha with -O3 Product: gcc Version: 5.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: dhowells at redhat dot com Target Milestone: --- Created attachment 36782 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36782&action=edit Reduced test case When compiling the attached test case for alpha-linux-gnu with -O3, the compiler segfaults and produces the following: alpha-linux-gnu-gcc -c -O3 /tmp/bz1265791-testcase.c /tmp/bz1265791-testcase.c: In function ‘synchronize_rcu_tasks’: /tmp/bz1265791-testcase.c:8:6: internal compiler error: Segmentation fault void synchronize_rcu_tasks(void) ^ /usr/libexec/gcc/alpha-linux-gnu/5.2.1/cc1 -quiet -v /tmp/bz1265791-testcase.c -quiet -dumpbase bz1265791-testcase.c -auxbase bz1265791-testcase -O3 -version -o /tmp/ccf0UqVc.s I caught it in gdb: Program received signal SIGSEGV, Segmentation fault. fold_builtin_alloca_with_align (stmt=0x7ffff19436c0) at ../../gcc-5.2.1-20150716/gcc/tree-ssa-ccp.c:2067 2067 && TREE_CODE (BLOCK_SUPERCONTEXT (block)) == FUNCTION_DECL)) and I got the following backtrace: #0 fold_builtin_alloca_with_align (stmt=0x7ffff19436c0) at ../../gcc-5.2.1-20150716/gcc/tree-ssa-ccp.c:2067 #1 ccp_fold_stmt (gsi=0x7fffffffd8a0) at ../../gcc-5.2.1-20150716/gcc/tree-ssa-ccp.c:2172 #2 0x0000000000a07c17 in substitute_and_fold_dom_walker::before_dom_children ( this=0x7fffffffd960, bb=0x7ffff191faf8) at ../../gcc-5.2.1-20150716/gcc/tree-ssa-propagate.c:1177 #3 0x0000000000b8dfe8 in dom_walker::walk (this=0x7fffffffd960, bb=0x7ffff191faf8) at ../../gcc-5.2.1-20150716/gcc/domwalk.c:188 #4 0x0000000000a0762a in substitute_and_fold ( get_value_fn=get_value_fn@entry=0x9942f0 <get_constant_value(tree)>, fold_fn=fold_fn@entry=0x99bfa0 <ccp_fold_stmt(gimple_stmt_iterator*)>, do_dce=do_dce@entry=true) at ../../gcc-5.2.1-20150716/gcc/tree-ssa-propagate.c:1272 #5 0x0000000000993b41 in ccp_finalize () at ../../gcc-5.2.1-20150716/gcc/tree-ssa-ccp.c:941 #6 do_ssa_ccp () at ../../gcc-5.2.1-20150716/gcc/tree-ssa-ccp.c:2382 #7 (anonymous namespace)::pass_ccp::execute (this=<optimized out>) at ../../gcc-5.2.1-20150716/gcc/tree-ssa-ccp.c:2414 #8 0x000000000083aa9e in execute_one_pass (pass=pass@entry=0x12221d0) at ../../gcc-5.2.1-20150716/gcc/passes.c:2330 #9 0x000000000083aeb6 in execute_pass_list_1 (pass=0x12221d0) at ../../gcc-5.2.1-20150716/gcc/passes.c:2382 ---Type <return> to continue, or q <return> to quit--- #10 0x000000000083aec8 in execute_pass_list_1 (pass=0x1222050, pass@entry=0x1221f90) at ../../gcc-5.2.1-20150716/gcc/passes.c:2383 #11 0x000000000083af09 in execute_pass_list (fn=0x7ffff193cf18, pass=0x1221f90) at ../../gcc-5.2.1-20150716/gcc/passes.c:2393 #12 0x00000000005fa268 in cgraph_node::expand (this=this@entry=0x7ffff183a300) at ../../gcc-5.2.1-20150716/gcc/cgraphunit.c:1895 #13 0x00000000005fb4ac in expand_all_functions () at ../../gcc-5.2.1-20150716/gcc/cgraphunit.c:2031 #14 symbol_table::compile (this=0x7ffff183c000) at ../../gcc-5.2.1-20150716/gcc/cgraphunit.c:2384 #15 0x00000000005fc8b8 in symbol_table::finalize_compilation_unit ( this=0x7ffff183c000) at ../../gcc-5.2.1-20150716/gcc/cgraphunit.c:2461 #16 0x00000000005114cb in c_write_global_declarations () at ../../gcc-5.2.1-20150716/gcc/c/c-decl.c:10798 #17 0x00000000008d8d55 in compile_file () at ../../gcc-5.2.1-20150716/gcc/toplev.c:613 #18 0x00000000004fde1f in do_compile () at ../../gcc-5.2.1-20150716/gcc/toplev.c:2067 #19 toplev::main (this=this@entry=0x7fffffffdce0, argc=argc@entry=13, argv=argv@entry=0x7fffffffdde8) at ../../gcc-5.2.1-20150716/gcc/toplev.c:2165 #20 0x00000000004fe7aa in main (argc=13, argv=0x7fffffffdde8) at ../../gcc-5.2.1-20150716/gcc/main.c:39