Adjust scan string for PIE
[official-gcc.git] / gcc / testsuite / gcc.dg / attr-alloc_align-1.c
blob45f5ec065e452c45059e2c859408353d8d9f972e
1 /* { dg-do compile } */
2 /* { dg-options "-O3" } */
4 double *my_alloc1 (int len, int align) __attribute__((__alloc_align__ (2)));
5 double *my_alloc2 (int align, int len) __attribute__((alloc_align (1)));
7 void
8 test1 (int len, int align)
10 int i;
11 double *__restrict o1 = my_alloc1 (len, 32);
12 double *__restrict o2 = my_alloc1 (len, 32);
13 double *__restrict o3 = my_alloc1 (len, 32);
14 double *__restrict i1 = my_alloc1 (len, 32);
15 double *__restrict i2 = my_alloc1 (len, align);
16 for (i = 0; i < len; ++i)
18 o1[i] = i1[i] * i2[i];
19 o2[i] = i1[i] + i2[i];
20 o3[i] = i1[i] - i2[i];
24 void
25 test2 (int len, int align)
27 int i;
28 double *__restrict o1 = my_alloc2 (32, len);
29 double *__restrict o2 = my_alloc2 (32, len);
30 double *__restrict o3 = my_alloc2 (32, len);
31 double *__restrict i1 = my_alloc2 (32, len);
32 double *__restrict i2 = my_alloc2 (align, len);
33 for (i = 0; i < len; ++i)
35 o1[i] = i1[i] * i2[i];
36 o2[i] = i1[i] + i2[i];
37 o3[i] = i1[i] - i2[i];