1
0
mirror of https://github.com/skeeto/w64devkit.git synced 2025-11-04 13:11:39 +03:00

GCC 14 seh_cfa_offset regression fix (#138)

This commit is contained in:
Christopher Wellons
2024-06-10 17:54:14 -04:00
parent 28912083d7
commit 7d6330afae

View File

@@ -0,0 +1,19 @@
commit 2f0e0862406a17bb8bf4ad948ae22916bae092a0
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Wed May 22 18:10:39 2024 +0200
Fix internal error in seh_cfa_offset 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.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115038
--- a/gcc/fold-mem-offsets.cc
+++ b/gcc/fold-mem-offsets.cc
@@ -493,3 +493,3 @@ fold_offsets (rtx_insn *insn, rtx reg, bool analyze, bitmap foldable_insns)
- if (!def || GET_CODE (PATTERN (def)) != SET)
+ if (!def || RTX_FRAME_RELATED_P (def) || GET_CODE (PATTERN (def)) != SET)
return 0;