1 /* Test qualifier preservation of typeof and discarded for __auto_type. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c11" } */
5 /* Check that the qualifiers are preserved for atomic types. */
11 extern int _Atomic
const ci
;
12 extern __typeof (ci
) ci
;
14 extern int _Atomic
volatile vi
;
15 extern __typeof (vi
) vi
;
17 extern int * _Atomic restrict ri
;
18 extern __typeof (ri
) ri
;
20 /* Check that the qualifiers are discarded for atomic types. */
34 /* Check that the qualifiers are preserved for non-atomic types. */
38 extern int volatile k
;
40 extern int * restrict q
;
43 extern __typeof (nci
) j
;
45 extern int volatile nvi
;
46 extern __typeof (nvi
) k
;
48 extern int * restrict nri
;
49 extern __typeof (nri
) q
;
51 /* Check that the qualifiers are discarded for non-atomic types. */
55 __auto_type aci
= nci
;
58 __auto_type avi
= nvi
;
61 __auto_type ari
= nri
;