On 5/20/24 1:13 AM, Eric Botcazou wrote:
Hi,
this is a regression present on mainline and 14 branch under the form of an
ICE in seh_cfa_offset from config/i386/winnt.cc on the attached C++ testcase
compiled with -O2 -fno-omit-frame-pointer.
The problem directly comes from the -ffold-mem-offsets pass messing up with
the prologue and the frame-related instructions, which is a no-no with SEH, so
the fix simply disconnects the pass in these circumstances, the question being
whether this should be done unconditionally as in the fix or only with SEH.
Tested on x86-64/Linux, OK for the mainline and 14 branch?
2024-05-20 Eric Botcazou <ebotca...@adacore.com>
PR rtl-optimization/115038
* fold-mem-offsets.cc (fold_offsets): Return 0 if the defining
instruction of the register is frame related.
2024-05-20 Eric Botcazou <ebotca...@adacore.com>
* g++.dg/opt/fmo1.C: New test.
lol. I missed that you had already submitted this when I made my
comment in the PR.
OK for the trunk and gcc-14 branch.
Jeff