[Bug c/108718] [10/11/12/13 Regression] csmith: possible bad code with -O2
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 9 20:12:26 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108718
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to David Binderman from comment #4)
> (In reply to Andrew Pinski from comment #3)
> > This also changes with -fno-strict-aliasing ...
>
> So does that mean that csmith is producing C code with UB and so
> this bug isn't valid ?
Not necessarily. If something misbehaves with -O2 and behaves as expected with
-O2 -fno-strict-aliasing, then it is usually a good sign that there is or might
be an aliasing violation, but it isn't a proof that there is one. Only
detailed analysis of the code or e.g. the latter only focused on what exactly
changes with the bisection point can reveal if it is or isn't valid.
More information about the Gcc-bugs
mailing list