https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67908

--- Comment #4 from Stefan Keller <gcc-bugs at zahlenfresser dot de> ---
So I rebuilt gcc:

GNU C99 (GCC) version 5.2.0 (armv7l-unknown-linux-gnueabihf)
        compiled by GNU C version 5.2.0, GMP version 6.0.0, MPFR version
3.1.3-p4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=88 --param ggc-min-heapsize=110029
GNU C99 (GCC) version 5.2.0 (armv7l-unknown-linux-gnueabihf)
        compiled by GNU C version 5.2.0, GMP version 6.0.0, MPFR version
3.1.3-p4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=88 --param ggc-min-heapsize=110029
Compiler executable checksum: 63e10edc02ccf1dede09ecb3cdb007dd

Program received signal SIGSEGV, Segmentation fault.
fold_builtin_alloca_with_align (stmt=0x766f0d20) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/tree-ssa-ccp.c:2067
2067            && TREE_CODE (BLOCK_SUPERCONTEXT (block)) == FUNCTION_DECL))
(gdb) bt
#0  fold_builtin_alloca_with_align (stmt=0x766f0d20) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/tree-ssa-ccp.c:2067
#1  ccp_fold_stmt (gsi=0x7efff4cc) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/tree-ssa-ccp.c:2172
#2  0x00697a2c in substitute_and_fold_dom_walker::before_dom_children
(this=0x7efff538, bb=0x0) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/tree-ssa-propagate.c:1177
#3  0x009c550c in dom_walker::walk (this=0x7efff538, bb=0x766dd940) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/domwalk.c:188
#4  0x00697458 in substitute_and_fold (get_value_fn=get_value_fn@entry=0x62b1c0
<get_constant_value(tree)>, fold_fn=fold_fn@entry=0x631bf4
<ccp_fold_stmt(gimple_stmt_iterator*)>, do_dce=do_dce@entry=true)
    at /usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/tree-ssa-propagate.c:1272
#5  0x0062973c in ccp_finalize () at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/tree-ssa-ccp.c:941
#6  0x00629f68 in do_ssa_ccp () at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/tree-ssa-ccp.c:2382
#7  (anonymous namespace)::pass_ccp::execute (this=<optimized out>) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/tree-ssa-ccp.c:2414
#8  0x004cb2d4 in execute_one_pass (pass=pass@entry=0x1053508) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/passes.c:2330
#9  0x004cb70c in execute_pass_list_1 (pass=0x1053508) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/passes.c:2382
#10 0x004cb724 in execute_pass_list_1 (pass=0x1053408, pass@entry=0x1053388) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/passes.c:2383
#11 0x004cb764 in execute_pass_list (fn=0x7669cb60, pass=0x1053388) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/passes.c:2393
#12 0x00271764 in cgraph_node::expand (this=this@entry=0x7669f000) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/cgraphunit.c:1895
#13 0x00272b9c in expand_all_functions () at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/cgraphunit.c:2031
#14 symbol_table::compile (this=this@entry=0x76ad1000) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/cgraphunit.c:2384
#15 0x00274184 in symbol_table::compile (this=0x76ad1000) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/timevar.h:110
#16 symbol_table::finalize_compilation_unit (this=0x76ad1000) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/cgraphunit.c:2461
#17 0x0018393c in c_write_global_declarations () at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/c/c-decl.c:10798
#18 0x00573920 in compile_file () at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/toplev.c:613
#19 0x0016d3a0 in do_compile () at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/toplev.c:2067
#20 toplev::main (this=this@entry=0x7efff8d4, argc=0, argc@entry=27,
argv=0x106e6d8, argv@entry=0x7efffa44) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/toplev.c:2165
#21 0x0016dfcc in main (argc=27, argv=0x7efffa44) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/main.c:39

(gdb) p stmt
$1 = (gimple) 0x766f0d20
(gdb) p *stmt
$2 = {code = GIMPLE_CALL, no_warning = 0, visited = 1, nontemporal_move = 0,
plf = 0, modified = 0, has_volatile_ops = 0, pad = 0, subcode = 32, uid = 1,
location = 1840891, num_ops = 5, bb = 0x766dd940, next = 0x7682f2f8, 
  prev = 0x767fd900}
(gdb) up
#1  ccp_fold_stmt (gsi=0x7efff4cc) at
/usr/src/misc/pkg/gcc/src/gcc-5.2.0/gcc/tree-ssa-ccp.c:2172
2172                tree new_rhs = fold_builtin_alloca_with_align (stmt);
(gdb) p gsi
$3 = (gimple_stmt_iterator *) 0x7efff4cc
(gdb) p *gsi
$4 = {ptr = 0x766f0d20, seq = 0x766dd960, bb = 0x766dd940}

Hope this helps.

Reply via email to