[Bug rtl-optimization/126374] Incorrect codegen with -O2 -fno-tree-sra, struct containing union

carlosgalvezp at gmail dot com via Gcc-bugs <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126374

--- Comment #5 from Carlos Galvez <carlosgalvezp at gmail dot com> ---
Thank you for the inputs!

I tried reverting the added pass, this line:

      NEXT_PASS (pass_fre, false /* may_iterate */);

https://github.com/gcc-mirror/gcc/commit/744fd446c321f78f9a1ce4ef5f83df8dcfa44a9e#diff-71986eb7f13d7073c4843d4cb431491335b9e6d3ed250ce02f02a78e70faad3aR315

And that was enough to continue triggering the issue. Next I arrive to this
other commit also on GCC 10:

https://github.com/gcc-mirror/gcc/commit/ff6686d2e5f797d6c6a36ad14a7084bc1dc350e4

Which sounds like a major related refactor that would likely have fixed the
bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.