[Bug tree-optimization/71957] [5/6/7 Regression] Invalid code generation with function static objects
sebastian.huber@embedded-brains.de
gcc-bugzilla@gcc.gnu.org
Fri Jul 22 08:25:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71957
Sebastian Huber <sebastian.huber@embedded-brains.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |INVALID
--- Comment #5 from Sebastian Huber <sebastian.huber@embedded-brains.de> ---
(In reply to Sebastian Huber from comment #4)
> (In reply to Richard Biener from comment #3)
> > On a second look the testcase looks invalid as it invokes a virtual function
> > via C<D> on an object of type C<A>. Why do you think doing this is valid?
>
> I try to generate a new test case without the reinterpret cast.
Sorry, you are right, this is undefined behaviour. Without the reinterpret
casts it is not reproducible. I reduced the test case from a larger code base
via the delta tool. This code worked for years well. Using the
-fsanitize=unreachable option would have saved some trouble.
More information about the Gcc-bugs
mailing list