| 1 |
// { dg-do assemble } |
| 2 |
// g++ 1.37.1 bug 900519_07 |
| 3 |
|
| 4 |
// It is illegal to specify or to use array-of-reference types, yet g++ |
| 5 |
// allows them to be specified (in typedef statements and in declarations) |
| 6 |
// and to be used (in declarations). |
| 7 |
|
| 8 |
// keywords: reference types, array types |
| 9 |
|
| 10 |
int i; |
| 11 |
int j; |
| 12 |
|
| 13 |
typedef int& int_ref; |
| 14 |
typedef int_ref int_ref_array_type[2]; // { dg-error "17:declaration of .int_ref_array_type. as array of references" } missed |
| 15 |
|
| 16 |
int& int_ref_array_obj0[2] = { i, j }; // { dg-error "6:declaration of .int_ref_array_obj0. as array of references" } missed |
| 17 |
int_ref int_ref_array_obj1[2] = { i, j }; // { dg-error "9:declaration of .int_ref_array_obj1. as array of references" } missed |