https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95237

            Bug ID: 95237
           Summary: LOCAL_DECL_ALIGNMENT shrinks alignment, FAIL
                    gcc.target/i386/pr69454-2.c
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

The testcase and a few others now ICEs on x86_64 with -m32 since
LOCAL_DECL_ALIGNMENT with -mpreferred-stack-boundary=2 shrinks alignment
of 'long long' from 8 to 4.

/home/rguenther/src/trunk/gcc/testsuite/gcc.target/i386/pr69454-2.c: In
function 'fn1':^M
/home/rguenther/src/trunk/gcc/testsuite/gcc.target/i386/pr69454-2.c:7:6:
internal compiler error: in execute, at adjust-alignment.c:73^M
0x216245b execute^M
        ../../src/trunk/gcc/adjust-alignment.c:73^M
Please submit a full bug report,^M

this was a latent wrong-code bug before if you consider

typedef __UINTPTR_TYPE__ uintptr_t;
void __attribute__((noipa)) foo (long long *p, uintptr_t a)
{
  if ((uintptr_t)p & (a-1))
    __builtin_abort ();
}
int main()
{
  long long x;
  uintptr_t a = __alignof__(x);
  foo(&x, a);
  return 0;
}

and the frame of main not being aligned to 8 bytes.

Reply via email to