libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / stackalign / nested-1.c
blobae9047e783d927126c20af1d07cb61e24e4e94d1
1 /* { dg-do run } */
2 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } } */
3 /* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } } */
5 #include "check.h"
7 #ifndef ALIGNMENT
8 #define ALIGNMENT 64
9 #endif
11 typedef int aligned __attribute__((aligned(ALIGNMENT)));
13 int global;
15 void
16 foo (void)
18 aligned j;
20 void bar ()
22 aligned i;
24 if (check_int (&i, __alignof__(i)) != i)
25 abort ();
27 if (check_int (&j, __alignof__(j)) != j)
28 abort ();
30 j = -20;
32 bar ();
34 if (j != -20)
35 abort ();
37 if (check_int (&j, __alignof__(j)) != j)
38 abort ();
41 int
42 main()
44 foo ();
45 return 0;