https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69454
--- Comment #26 from Ilya Enkovich <ienkovich at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #25)
> Please add -mpreferred-stack-boundary=2 to your tests. Otherwise,
> you just remove a nop.
Here is a test which crashes LRA with the path you proposed. Crash happens
because LRA requests a stack slot aligned by 8 and stack is aligned by 4. So
Jakub's patch looks the safest option for now, but probably use 64 requirement
instead of 128.
>cat test.i
long long a, b;
fn1() {
long long c = a;
a = b ^ a;
fn2();
a = c;
}
>gcc test.i -O2 -m32 -mpreferred-stack-boundary=2
test.i: In function 'fn1':
test.i:5:3: warning: implicit declaration of function 'fn2'
[-Wimplicit-function-declaration]
fn2();
^~~
test.i:7:1: internal compiler error: in assign_stack_local_1, at function.c:409