gcc/testsuite/c-c++-common/pr95237-1.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-require-effective-target ia32 } */ |
| 3 | /* { dg-options "-mpreferred-stack-boundary=2" { target { i?86-*-* x86_64-*-* } } } */ |
| 4 | typedef __UINTPTR_TYPE__ uintptr_t; |
| 5 | void __attribute__((noipa)) foo (long long *p, uintptr_t a) |
| 6 | { |
| 7 | if ((uintptr_t)p & (a-1)) |
| 8 | __builtin_abort (); |
| 9 | } |
| 10 | int main() |
| 11 | { |
| 12 | long long x; |
| 13 | uintptr_t a = __alignof__(x); |
| 14 | foo(&x, a); |
| 15 | return 0; |
| 16 | } |