https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88936
The bug remains ASSIGNED despite claims in one of the current PRs to this repository that GCC 8.3.0 contained fixes, despite no explicit mention of this bug in the 8.3.0 changelog.
Wow, great find! I've disabled -fipa-pta globally in this repo until this gets resolved. Anyone using a supported configuration should receive the update to their CFLAGS when they next emerge --sync. Hopefully this will be resolved in the next major GCC release. I may post an eselect news at some point advising anyone using this flag to do a full system rebuild.
I'm not surprised to see this confirmed. Had a lot of strange issues with it myself and had stopped using it pretty early rather than setting exceptions, often the problems weren't segfaults but strange behavior that were hard to diagnose later on.
I've been using -fipa-pta on world since forever and had no issues whatsoever. I'm on AMD, is it confined to Intel only? Could you give specific example of erroneous behaviour others could replicate and check against?
Well, the problem is that -fipa-pta generates invalid code in specific situations. There's no guarantee that you would hit these cases at runtime, which can explain why you didn't notice any issue. I haven't had issues with the flag either (excepted maybe as properly handled by the LTO workarounds from this overlay) but the threat of invalid code generation is scary enough to warrant avoiding the flag by default.
This isn't specific to Intel, and an example of the problem with a reproducer is given in the GCC bug tracker link posted in this issue.
Better to stay safe than sorry for sure. I'll re-enable this once it's fixed upstream.
Now fixed in trunk:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88936
GCC 9.1.0 is now live and GentooLTO now supports it. I'm leaving -fipa-pta out of the defaults for a few weeks while everyone upgrades. However, interested users can opt in manually in their CFLAGS. Leaving this issue open until it is re-added, in case problems arise.
OK -- no major hurdles from -fipa-pta, so closing this issue. If it needs to be reopened, just comment.
Most helpful comment
Now fixed in trunk:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88936