| 1 |
/* make sure we don't duplicate type qualifiers unneeded. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-std=c11 -gdwarf-5 -dA" } */ |
| 4 |
|
| 5 |
/* This should give us: |
| 6 |
- One const type pointing to a char |
| 7 |
- One volatile type pointing to a char |
| 8 |
- One atomic type pointing to a char |
| 9 |
- Either one const type pointing to the volatile type pointing to a char |
| 10 |
or one volatile type pointing to the const type pointing to a char. |
| 11 |
But not both. |
| 12 |
- Either one volatile type pointing to an atomic type pointing to a char |
| 13 |
or one atomic type pointing to a volatile type pointing to a char. |
| 14 |
But not both. |
| 15 |
- One restrict type pointing to a char pointer. |
| 16 |
- One atomic type pointing to a char pointer. |
| 17 |
- Either one restrict type pointing to an atomic type pointing to a char |
| 18 |
pointer or one atomic type pointing to a restrict type pointing to a |
| 19 |
char pointer. |
| 20 |
But not both. */ |
| 21 |
|
| 22 |
|
| 23 |
char a; |
| 24 |
const char b; |
| 25 |
volatile const char c; |
| 26 |
volatile char d; |
| 27 |
const volatile char e; |
| 28 |
_Atomic char f; |
| 29 |
_Atomic volatile char g; |
| 30 |
char * _Atomic restrict h; |
| 31 |
char * _Atomic i; |
| 32 |
char * restrict j; |
| 33 |
|
| 34 |
/* The xfail is due to PR66668. */ |
| 35 |
/* { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_(?:const|volatile|atomic|restrict)_type" 8 { xfail cris-*-* } } } */ |