1 /* { dg-do run } */
2
3 #include "check.h"
4
5 #ifndef ALIGNMENT
6 #define ALIGNMENT 64
7 #endif
8
9 typedef int t_align __attribute__((aligned(ALIGNMENT)));
10
11
12 int global, global2;
bar()13 void bar()
14 {
15 volatile t_align a = 1;
16 int i,j,k;
17 i=j=k=0;
18 for (i=0; i < global; i++)
19 for (j=0; j < i; j++)
20 {
21 global2 = k;
22 throw 0;
23 }
24 if (check_int ((int *) &a, __alignof__(a)) != a)
25 abort ();
26 }
27
main()28 int main()
29 {
30 int ll = 1;
31 int i = 0,j = 1,k = 2,l = 3,m = 4,n = 5;
32 try {
33 for (; i < global; i++)
34 for (; j < i; j++)
35 for (; k < j; k++)
36 for (; l < k; l++)
37 for (; m < l; m++)
38 for (; n < m; n++)
39 global2 = k;
40 bar ();
41 }
42 catch (...)
43 {
44 }
45 ll = i+j+k+l+m+n;
46 if (ll != 15)
47 {
48 #ifdef DEBUG
49 printf("FAIL: sum %d != 15\n", ll);
50 #endif
51 abort();
52 }
53 return 0;
54 }
55