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

--- Comment #2 from Ilya Maximets <i.maximets at ovn dot org> ---
(In reply to Richard Biener from comment #1)
> Well, between the store to ->source and the read from it is the call
> to dp_packet_use_afxdp which gets &xpacket->packet as argument and thus
> needs to be treated as clobbering ->source.  So GCC can indeed not know
> that ->source is DPBUF_AFXDP since the path is not provable impossible.
> dp_packet_use_afxdp doesn't even get a const struct dp_packet * argument
> (not that this would semantically change things in C).

Hmm, dp_packet_use_afxdp() is the function that sets source to DPBUF_AFXDP
and initializes other parts of the structure.  So, it cannot take a const
argument.  If GCC just doesn't look inside the dp_packet_use_afxdp() function
at all here, then it will indeed not know that the source is DPBUF_AFXDP now.

However, I'm not sure why the issue doesn't appear with -O0 then.

Reply via email to