This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/82060] [7/8 Regression] ICE in refs_may_alias_p_1 with devirtualization enabled
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 01 Sep 2017 07:34:52 +0000
- Subject: [Bug tree-optimization/82060] [7/8 Regression] ICE in refs_may_alias_p_1 with devirtualization enabled
- Auto-submitted: auto-generated
- References: <bug-82060-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82060
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2017-09-01
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
#1 0x0000000001329897 in refs_may_alias_p_1 (ref1=0x7fffffffd4b0,
ref2=0x7fffffffd2a0, tbaa_p=true) at /tmp/trunk2/gcc/tree-ssa-alias.c:1538
1538 gcc_unreachable ();
(gdb) p ref2->ref
$3 = <mem_ref 0x7ffff69e67d0>
(gdb) p ref2->base
$4 = <component_ref 0x7ffff6a0e690>
because
(gdb) p debug_gimple_stmt (stmt)
# .MEM_10 = VDEF <.MEM_4>
MEM[(struct B *)&c].ma = OBJ_TYPE_REF(_2;(struct D)d_6(D)->0) (d_6(D));
$11 = void
has an unfolded LHS:
<mem_ref 0x7ffff69e67d0
type <record_type 0x7ffff69e89d8 A sizes-gimplified type_5 type_6 QI
size <integer_cst 0x7ffff6891fc0 constant 8>
...
arg:0 <addr_expr 0x7ffff6a09d40
type <pointer_type 0x7ffff69e83f0 type <record_type 0x7ffff69e89d8 A>
public unsigned DI
size <integer_cst 0x7ffff6891ed0 constant 64>
unit-size <integer_cst 0x7ffff6891ee8 constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set 1 canonical-type
0x7ffff69e83f0>
arg:0 <component_ref 0x7ffff6a0e690 type <record_type 0x7ffff69e89d8 A>
arg:0 <mem_ref 0x7ffff6a128c0 type <record_type 0x7ffff69e8c78 B>
arg:0 <addr_expr 0x7ffff6a09d60 type <pointer_type
0x7ffff69e87e0>
arg:0 <var_decl 0x7ffff69fe870 c>>
propagated by PRE. So this ends up running into
/* Visit indirect calls and turn them into direct calls if
possible using the devirtualization machinery. */
if (gcall *call_stmt = dyn_cast <gcall *> (stmt))
{
before we fold (and thus canonicalize) the stmt:
if (gimple_modified_p (stmt))
{
...