1 /* Test C11 _Alignof returning minimum alignment for a type. PR
4 /* { dg-options "-std=c11" } */
6 extern void abort (void);
7 extern void exit (int);
9 #define CHECK_ALIGN(TYPE) \
12 struct { char c; TYPE v; } x; \
13 if (_Alignof (TYPE) > __alignof__ (x.v)) \
23 CHECK_ALIGN (signed char);
24 CHECK_ALIGN (unsigned char);
25 CHECK_ALIGN (signed short);
26 CHECK_ALIGN (unsigned short);
27 CHECK_ALIGN (signed int);
28 CHECK_ALIGN (unsigned int);
29 CHECK_ALIGN (signed long);
30 CHECK_ALIGN (unsigned long);
31 CHECK_ALIGN (signed long long);
32 CHECK_ALIGN (unsigned long long);
35 CHECK_ALIGN (long double);
36 CHECK_ALIGN (_Complex
float);
37 CHECK_ALIGN (_Complex
double);
38 CHECK_ALIGN (_Complex
long double);