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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=109945

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
The transform in main is because we do

Value numbering stmt = _22 = &MEM <struct EnumeratorRange> [(void
*)&intersections + 1B] == _34;
Applying pattern match.pd:6940, gimple-match-5.cc:1815
Match-and-simplified &MEM <struct EnumeratorRange> [(void *)&intersections +
1B] == _34 to 0
RHS &MEM <struct EnumeratorRange> [(void *)&intersections + 1B] == _34
simplified to 0
Setting value number of _22 to 0 (changed)
Value numbering stmt = intersections.end_reached_ = _22;
No store match
Value numbering store intersections.end_reached_ to 0
Setting value number of .MEM_93 to .MEM_93 (changed)
Value numbering stmt = if (&MEM <struct EnumeratorRange> [(void
*)&intersections + 1B] == _34)
marking known outgoing edge 12 -> 15 executable

and that's using

/* Simplify pointer equality compares using PTA.  */
(for neeq (ne eq)
 (simplify
  (neeq @0 @1)
  (if (POINTER_TYPE_P (TREE_TYPE (@0))
       && ptrs_compare_unequal (@0, @1))
   { constant_boolean_node (neeq != EQ_EXPR, type); })))

which makes it really a similar issue as PR109945 - _34 points to
nonlocal/escaped but 'intersections' isn't part of that set though it
probably "escapes" at

<bb 2> [local count: 118111600]:
intersections = CompositeMesh::Intersections (&mesh); [return slot
optimization]

-fno-tree-pta is a (quite heavy) workaround.

Reply via email to