https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108673
Bug ID: 108673
Summary: ICE with -fstack-clash-protection and noreturn
attribute on x86_64-w64-mingw32
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: lh_mouse at 126 dot com
Target Milestone: ---
Original reported by Théo Cavignac here:
https://sourceforge.net/p/mingw-w64/mailman/message/37773946/
The ICE is only reproducible on x86_64-w64-mingw32, not on i686-w64-mingw32.
Original testcase follows:
```
/*
/usr/bin/x86_64-w64-mingw32-gcc \
-O2 -fstack-clash-protection -c \
-freport-bug \
-o f.o f.c
*/
void exit(int) __attribute__((noreturn));
void foo(int p) {
exit(p);
}
```
```
# gcc -O2 -fstack-clash-protection f.c
during RTL pass: final
f.c: In function 'foo':
f.c:11:4: internal compiler error: in seh_emit_stackalloc, at
config/i386/winnt.cc:1055
11 | }
| ^
libbacktrace could not find executable to open
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://github.com/lhmouse/MINGW-packages/issues> for instructions.
```