Skip to content

Commit 7d6330a

Browse files
committed
GCC 14 seh_cfa_offset regression fix (#138)
1 parent 2891208 commit 7d6330a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/gcc-seh_cfa_offset.patch

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
commit 2f0e0862406a17bb8bf4ad948ae22916bae092a0
2+
Author: Eric Botcazou <[email protected]>
3+
Date: Wed May 22 18:10:39 2024 +0200
4+
5+
Fix internal error in seh_cfa_offset with -O2 -fno-omit-frame-pointer
6+
7+
The problem directly comes from the -ffold-mem-offsets pass messing up with
8+
the prologue and the frame-related instructions, which is a no-no with SEH,
9+
so the fix simply disconnects the pass in these circumstances.
10+
11+
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115038
12+
13+
--- a/gcc/fold-mem-offsets.cc
14+
+++ b/gcc/fold-mem-offsets.cc
15+
@@ -493,3 +493,3 @@ fold_offsets (rtx_insn *insn, rtx reg, bool analyze, bitmap foldable_insns)
16+
17+
- if (!def || GET_CODE (PATTERN (def)) != SET)
18+
+ if (!def || RTX_FRAME_RELATED_P (def) || GET_CODE (PATTERN (def)) != SET)
19+
return 0;

0 commit comments

Comments
 (0)