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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Huh, I believe this is wrong and the verifier does sth odd (it uses TREE_TYPE
(TREE_TYPE (cfun->decl))).  So restype <- actual return type <-> propagate from
is useless, but restype <- propagate from is not?

Actually, for comparisons we only require

  /* For comparisons we do not have the operations type as the
     effective type the comparison is carried out in.  Instead
     we require that either the first operand is trivially
     convertible into the second, or the other way around.  */
  if (!useless_type_conversion_p (op0_type, op1_type)
      && !useless_type_conversion_p (op1_type, op0_type))

so I think DOM would need to ensure compatibility is both-wise before doing
conditional equivalence propagation?

That said, RESULT_DECL isn't special here, it seems that greturn * is (and
I wonder whether that's the bug).

Reply via email to