aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr95237-1.c
blob: 8947a9fed26636dad83958c616ac99eedd55673a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do run } */
/* { dg-require-effective-target ia32 } */
/* { dg-options "-mpreferred-stack-boundary=2" { target { i?86-*-* x86_64-*-* } } } */
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;
}