* gcc.dg/torture/stackalign/builtin-apply-2.c: Fix skip-if syntax.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / stackalign / nested-2.c
blobecfdcb017467d3503f0305885c6dbf98eb0d23af
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 __attribute__ ((__noinline__))
21 void bar ()
23 aligned i;
25 if (check_int (&i, __alignof__(i)) != i)
26 abort ();
28 if (check_int (&j, __alignof__(j)) != j)
29 abort ();
31 j = -20;
33 bar ();
35 if (j != -20)
36 abort ();
38 if (check_int (&j, __alignof__(j)) != j)
39 abort ();
42 int
43 main()
45 foo ();
46 return 0;