Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / torture / stackalign / nested-1.c
blob8402f95f594cff77eede1b267d0a8e6c8f744d5b
1 /* { dg-do run } */
2 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
4 #include "check.h"
6 #ifndef ALIGNMENT
7 #define ALIGNMENT 64
8 #endif
10 typedef int aligned __attribute__((aligned(ALIGNMENT)));
12 int global;
14 void
15 foo (void)
17 aligned j;
19 void bar ()
21 aligned i;
23 if (check_int (&i, __alignof__(i)) != i)
24 abort ();
26 if (check_int (&j, __alignof__(j)) != j)
27 abort ();
29 j = -20;
31 bar ();
33 if (j != -20)
34 abort ();
36 if (check_int (&j, __alignof__(j)) != j)
37 abort ();
40 int
41 main()
43 foo ();
44 return 0;