[Bug c++/64049] Wrong code at -O3
bernd.edlinger at hotmail dot de
gcc-bugzilla@gcc.gnu.org
Mon Nov 24 14:22:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64049
--- Comment #5 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Andrew Pinski from comment #4)
> v.value.LocalizedText = (LocalizedTextStruct*) "Localized Text";
>
>
> if you access v.value.LocalizedText as a LocalizedTextStruct the above
> causes undefined code.
I stripped that down from a much larger example.
The point is, that ValueStruct1.cpp is mis-compled,
and it cannot know what I did in ValueStruct2.cpp.
However it is easy to re-write the test case so that it does
not require any type casts.
More information about the Gcc-bugs
mailing list