| 1 |
/* DR 1511 - const volatile variables and the one-definition rule */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
|
| 4 |
typedef const int cint; |
| 5 |
typedef const volatile int cvint; |
| 6 |
typedef volatile int vint; |
| 7 |
const int v1 = 5; |
| 8 |
volatile const int v2 = 6; |
| 9 |
cint v3 = 7; |
| 10 |
cvint v4 = 8; |
| 11 |
const vint v5 = 9; |
| 12 |
volatile cint v6 = 10; |
| 13 |
const int w1 = 5; |
| 14 |
volatile const int w2 = 6; |
| 15 |
cint w3 = 7; |
| 16 |
cvint w4 = 8; |
| 17 |
const vint w5 = 9; |
| 18 |
volatile cint w6 = 10; |
| 19 |
const int &r1 = w1; |
| 20 |
volatile const int &r2 = w2; |
| 21 |
const int &r3 = w3; |
| 22 |
const volatile int &r4 = w4; |
| 23 |
const volatile int &r5 = w5; |
| 24 |
const volatile int &r6 = w6; |