https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71957
Sebastian Huber <sebastian.hu...@embedded-brains.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution|--- |INVALID --- Comment #5 from Sebastian Huber <sebastian.hu...@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.