* config/xtensa/xtensa.c (function_arg): Generalize logic so that it
[official-gcc.git] / gcc / testsuite / gcc.dg / array-quals-1.c
blob8068895053f4792221ec7fa2546cab3c65ba9c15
1 /* Test for various combinations of const, arrays and typedefs:
2 should never actually get const on the final array type, but
3 all should end up in a read-only section. PR c/12165. */
4 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
5 /* { dg-do compile } */
6 /* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail powerpc*-*-aix* } } } */
7 static const int a[2] = { 1, 2 };
8 const int a1[2] = { 1, 2 };
9 typedef const int ci;
10 static ci b[2] = { 3, 4 };
11 ci b1[2] = { 3, 4 };
12 typedef int ia[2];
13 static const ia c = { 5, 6 };
14 const ia c1 = { 5, 6 };
15 typedef const int cia[2];
16 static cia d = { 7, 8 };
17 cia d1 = { 7, 8 };
18 static cia e[2] = { { 1, 2 }, { 3, 4 } };
19 cia e1[2] = { { 1, 2 }, { 3, 4 } };
20 void *const p = &a;
21 void *const q = &b;
22 void *const r = &c;
23 void *const s = &d;
24 void *const t = &e;
25 void *const p1 = &a1;
26 void *const q1 = &b1;
27 void *const r1 = &c1;
28 void *const s1 = &d1;
29 void *const t1 = &e1;