summaryrefslogtreecommitdiff
path: root/dev-util/mingw64-toolchain/files/gcc-14.1.0-no-omit-fp-ice.patch
blob: a8e4c798ef172dae285c84737d80ab62232e6cd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Fix ICE w/ mingw[1][2][3] when using -fno-omit-frame-pointer.

Patch is from the proposed fix in [4].

[1] https://bugs.gentoo.org/932319
[2] https://github.com/msys2/MINGW-packages/issues/20861
[3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115038
[4] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115038#c4
--- a/gcc/gcc/fold-mem-offsets.cc
+++ b/gcc/gcc/fold-mem-offsets.cc
@@ -492,5 +492,5 @@
   rtx_insn *def = get_single_def_in_bb (insn, reg);
 
-  if (!def || GET_CODE (PATTERN (def)) != SET)
+  if (!def || RTX_FRAME_RELATED_P (def) || GET_CODE (PATTERN (def)) != SET)
     return 0;