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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Do we really need to do anything at all (except defining the new stuff in a
header), or possibly using __builtin_launder in it?
I mean, my understanding of the start lifetime as something is as if with
-flifetime-dse=1 there was a call to a constructor which just did nothing at
all (like e.g. the struct X { int a, b; }; constructor does).  And when we
inline such an constructor, there is no CLOBBER and no code at all, so in the
end nothing.
__builtin_launder is just an optimization barrier (and indeed it can look like
the address escapes).

I think PR101641 is just bad example, we do allow type punning through union,
but only if we can see it being done.  The testcase is trying to change active
union member through just a store through a pointer to union member, that is
not what we support I believe.

Reply via email to