[Bug c++/59083] -fisolate-erroneous-paths produces illegal instruction with enabled -fprofile-generate
law at redhat dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 13 07:34:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59083
--- Comment #11 from Jeffrey A. Law <law at redhat dot com> ---
Damn it. Tested the wrong compiler.
The problem with your testcase Markus is you're simply not allowed to pass a
null pointer to sprintf, memcpy and a variety of other functions. Once you
execute code which attempts that, you've walked into the realm of undefined
behaviour.
Once you cross that boundary the compiler is allowed to do these kinds of
transformations. Your testcode is fundamentally flawed in that it relies upon
undefined behaviour.
More information about the Gcc-bugs
mailing list