https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89544
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2025-06-27
CC| |hjl.tools at gmail dot com
Status|UNCONFIRMED |NEW
--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> ---
On x86, arguments on stack also have natural alignment:
[hjl@gnu-tgl-3 pr120839]$ cat x.c
typedef struct {
long double a;
long double b;
} c __attribute__((aligned(32)));
extern double d;
void
e (c f)
{
_Static_assert (__alignof (f) == 16, "__alignof (f) == 16)");
d = f.a;
}
[hjl@gnu-tgl-3 pr120839]$ make CC=gcc
gcc -O2 -S x.c
x.c: In function āeā:
x.c:9:3: error: static assertion failed: "__alignof (f) == 16)"
9 | _Static_assert (__alignof (f) == 16, "__alignof (f) == 16)");
| ^~~~~~~~~~~~~~
make: *** [Makefile:36: x.s] Error 1
[hjl@gnu-tgl-3 pr120839]$