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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
In the test case in comment #0 the operand of the return statement in first()
dereferences the tmp pointer:

  return tmp->list.n;

The expression is equivalent to (*tmp).list.n where the dereference should be
more obvious.  The dereference is invalid if tmp points to an object of an
incompatible type.  This is a basic type-based aliasing requirement that GCC
relies on.

If the test case isn't representative of the problem you see in the code base
please submit one that does.

Reply via email to