https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111418
--- Comment #1 from Martin Jansa ---
https://github.com/csmith-project/creduce
reduced my test case to:
typedef a;
typedef struct {
short b __attribute__((aligned(8)))
} c;
typedef struct {
short d __attribute__((aligned(8)))
} e;
typedef struct {
int f;
a g
} h;
typedef struct {
int i;
int j;
a k;
h l;
e m;
a n;
a o;
a p;
a a;
a q
} r;
typedef struct {
r s;
r t;
r u;
r b;
a : 2, : 22, : 10;
a : 4, : 4, : 16;
struct {
char c;
c d;
c e
}
} v;
w;
x() {
v a;
w = __builtin_alloca(sizeof(e));
a.s.l.f = a.s.l.g = x;
ai(a);
}
$ aarch64-oe-linux-gcc --version
aarch64-oe-linux-gcc (GCC) 13.2.0
And to reproduce need to use -fstack-protector-strong as well as -O2:
$ aarch64-oe-linux-gcc -fstack-protector-strong -O2 -c test.c
... bunch of warnings ...
test.c:43:1: error: unrecognizable insn:
43 | }
| ^
(insn 87 27 29 2 (parallel [
(set (mem/c:SI (plus:DI (reg/f:DI 29 x29)
(const_int -260 [0xfefc])) [1 a.s.l.f+0 S4
A32])
(reg:SI 4 x4 [107]))
(set (mem/c:SI (plus:DI (reg/f:DI 29 x29)
(const_int -256 [0xff00])) [1 a.s.l.g+0 S4
A128])
(reg:SI 4 x4 [107]))
]) "test.c":42:3 -1
(expr_list:REG_DEAD (reg:SI 4 x4 [107])
(nil)))
during RTL pass: cprop_hardreg
test.c:43:1: internal compiler error: in extract_insn, at recog.cc:2791
0x18d8d3b internal_error(char const*, ...)
???:0
0x6b3c5a fancy_abort(char const*, int, char const*)
???:0
0x692708 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
???:0
0x69272a _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
???:0
0xbe23ef extract_constrain_insn(rtx_insn*)
???:0
Will check with gcc trunk if it's still reproducible there. gcc-12.3.0 shows
the same ICE while gcc-11.4.0 built the same code OK.