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

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Joost.VandeVondele at mat dot 
ethz
                   |                            |.ch

--- Comment #8 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 
---
(In reply to Eric Botcazou from comment #3)
> The whole reasoning looks fairly dubious to me, the optimizer is free to do
> whatever it wants on undefined behavior and requests that the generated code
> behaves identically at all optimization levels on it have little merit IMO.

Of course, I agree that the code has undefined behavior, and that 'all bets are
off'. 

It just makes it more difficult for users to spot this undefined behavior, we
run our testsuite every night under valgrind, but can't move from -O1 to -O0,
since that would add a couple of hours to the test. Admittedly,
-fsanitize=memory would be a better solution, but it is not available with gcc.

Reply via email to