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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
If it is related to those union accesses then it should have nothing to do with
-ftree-vrp but it should vanish with -O2 -fno-strict-aliasing at least.

Note we do not implement any of "layout compatible" (whatever that exactly is)
for union members but if the difference is really just 'const T' vs. 'T' then
this should work.

Also note that GCC 8 is no longer supported and there's a newer 8.5.0 release
available as well.

It looks like the bug requires quite special circumstances to happen thus it's
likely just gone latent with newer compilers and/or different flags.

Unfortunately the preprocessed source lacks a main() and thus it's hard to
determine whether the bug occurs or not.  If you have ways to pinpoint
the function where things go wrong then it might be possible to spot a wrong
transform there (but a C++ code base is always hard to analyze because of all
the inlining and abstraction that happens).

Reply via email to