| 1 |
/* test that lvalue conversions drops qualifiers, Bug 97702 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "" } */ |
| 4 |
|
| 5 |
|
| 6 |
const int jc; |
| 7 |
extern int j; |
| 8 |
extern typeof(0,jc) j; |
| 9 |
extern typeof(+jc) j; |
| 10 |
extern typeof(-jc) j; |
| 11 |
extern typeof(1?jc:0) j; |
| 12 |
extern typeof((int)jc) j; |
| 13 |
extern typeof((const int)jc) j; |
| 14 |
|
| 15 |
volatile int kv; |
| 16 |
extern int k; |
| 17 |
extern typeof(0,kv) k; |
| 18 |
extern typeof(+kv) k; |
| 19 |
extern typeof(-kv) k; |
| 20 |
extern typeof(1?kv:0) k; |
| 21 |
extern typeof((int)kv) k; |
| 22 |
extern typeof((volatile int)kv) k; |
| 23 |
|
| 24 |
_Atomic int la; |
| 25 |
extern int l; |
| 26 |
extern typeof(0,la) l; |
| 27 |
extern typeof(+la) l; |
| 28 |
extern typeof(-la) l; |
| 29 |
extern typeof(1?la:0) l; |
| 30 |
extern typeof((int)la) l; |
| 31 |
extern typeof((_Atomic int)la) l; |
| 32 |
|
| 33 |
int * restrict mr; |
| 34 |
extern int *m; |
| 35 |
extern typeof(0,mr) m; |
| 36 |
extern typeof(1?mr:0) m; |
| 37 |
extern typeof((int *)mr) m; |
| 38 |
extern typeof((int * restrict)mr) m; |
| 39 |
|
| 40 |
|