8sa1-gcc/gcc/testsuite/g++.old-deja/g++.jason/ref11.C
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

18 lines
510 B
C

int main(int argc, char ** argv) {
int (&var_field_ref)[] = * (int (*)[]) new int [42];
int (&fix_field_ref)[1] = * (int (*)[1]) new int [42];
int static_field[42];
int *const &var_field_ptr_ref = var_field_ref; // gets bogus error
int *const &fix_field_ptr_ref = fix_field_ref;
int *const &static_field_ptr_ref = static_field;
int * var_field_ptr = var_field_ref; // gets bogus error
int * fix_field_ptr = fix_field_ref;
int * static_field_ptr = static_field;
return 0;
}