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

--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 24 Aug 2020, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96722
> 
> --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Created attachment 49111
>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49111&action=edit
> gcc11-pr96722.patch
> 
> If *0 ={v} {CLOBBER}; is supposed to be a fancy nop, then we should ignore it
> during path isolation (shouldn't infer UB from clobber stmts).

Hmm, I guess the bug is that walk_stmt_load_store_addr_ops considers
clobbers a store.  OTOH it may be that callers expect it to do that
(the callback gets passed the stmt to check itself if it wants).

So definitely the patch makes sense but still IMHO CDDCE has a
wrong-code bug here - it makes a conditional clobber unconditional.
Not sure if we can create a wrong-code testcase from C++s placement
of clobbers for a non-NULL case though.

Reply via email to