| 1 |
// { dg-do run } |
| 2 |
int main(int argc, char ** argv) { |
| 3 |
|
| 4 |
int (&var_field_ref)[] = * (int (*)[]) new int [42]; |
| 5 |
int (&fix_field_ref)[1] = * (int (*)[1]) new int [42]; |
| 6 |
|
| 7 |
int static_field[42]; |
| 8 |
|
| 9 |
int *const &var_field_ptr_ref = var_field_ref; // { dg-bogus "" } |
| 10 |
int *const &fix_field_ptr_ref = fix_field_ref; |
| 11 |
int *const &static_field_ptr_ref = static_field; |
| 12 |
|
| 13 |
int * var_field_ptr = var_field_ref; // { dg-bogus "" } |
| 14 |
int * fix_field_ptr = fix_field_ref; |
| 15 |
int * static_field_ptr = static_field; |
| 16 |
|
| 17 |
return 0; |
| 18 |
} |