David Malcolm <dmalcolm at gcc dot> changed:

           What    |Removed                     |Added
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2018-02-02
                 CC|                            |dmalcolm at gcc dot
           Assignee|unassigned at gcc dot      |dmalcolm at gcc dot
     Ever confirmed|0                           |1

--- Comment #1 from David Malcolm <dmalcolm at gcc dot> ---
Confirmed with trunk and gcc 7.

There seem to be two issues here; the differences seen between trunk and gcc 7
appear to be due to trunk currently defaulting to
and 7 defaulting to
and thus gcc_assert is a no-op by default for gcc 7.

Checked builds of trunk and gcc 7 both fail this assertion inside "ifcvt":

283           if (flag_checking)
284             for (gimple_stmt_iterator i = gsi_start (stmts);
285                  !gsi_end_p (i); gsi_next (&i))
286               gcc_assert (! gimple_use_ops (gsi_stmt (i)));

#1  0x00000000010b98ff in release_bb_predicate (bb=<basic_block 0x7ffff1a3eb60
(38)>) at ../../src/gcc/tree-if-conv.c:286
#2  0x00000000010b994c in free_bb_predicate (bb=<basic_block 0x7ffff1a3eb60
(38)>) at ../../src/gcc/tree-if-conv.c:300
#3  0x00000000010c091f in tree_if_conversion (loop=0x7ffff1a09ee0) at
#4  0x00000000010c0aa2 in (anonymous namespace)::pass_if_conversion::execute
(this=0x2abab80, fun=0x7ffff1a00160)
    at ../../src/gcc/tree-if-conv.c:2962
#5  0x0000000000ec11b2 in execute_one_pass (pass=<opt_pass* 0x2abab80
"ifcvt"(165)>) at ../../src/gcc/passes.c:2497


_175 = (signed char) _117;

Release builds of trunk and of gcc 7 fail later, reading through a NULL
basic_block in VRP:

(gdb) bt
#0  mark_block_for_update(basic_block_def*) () at
#1  0x0000000000af1c10 in mark_use_interesting (insert_phi_p=false,
bb=<basic_block 0x0>, stmt=<gimple_assign 0x7ffff1a1e910>, 
    var=<ssa_name 0x7ffff19fbc18>) at ../../src/gcc/tree-into-ssa.c:2540
#2  prepare_use_sites_for (insert_phi_p=false, name=<ssa_name 0x7ffff19fbc18>)
at ../../src/gcc/tree-into-ssa.c:2705
#3  prepare_names_to_update (insert_phi_p=false) at
#4  update_ssa(unsigned int) () at ../../src/gcc/tree-into-ssa.c:3339
#5  0x0000000000c39fd0 in insert_range_assertions () at
#6  execute_vrp (warn_array_bounds_p=false) at ../../src/gcc/tree-vrp.c:11724
#7  (anonymous namespace)::pass_vrp::execute(function*) () at
#8  0x00000000009df329 in execute_one_pass (pass=pass@entry=<opt_pass*
0x1c2a090 "vrp"(187)>) at ../../src/gcc/passes.c:2465

again on a GIMPLE_ASSIGN:
_177 = (signed char) _26;

due to it having a NULL bb:

(gdb) p stmt->bb
$5 = <basic_block 0x0>

Reply via email to