2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900331_04.C
blobddc39182ca4aedeff8e4d822f7772246dd4537d6
1 // { dg-do run  }
2 // g++ 1.37.1 bug 900331_04
4 // g++ is unable to correctly parse declarations of formal parameters and
5 // local objects which have pointer-to-array types or reference-to-array
6 // types.
8 // Cfront 2.0 passes this test.
10 // keywords: syntax, arrays, pointers, references, local, formal
12 int array[10];
14 int (*global_array_ptr)[10] = &array;
15 int (&global_array_ref)[10] = array;
17 void function0 (int (*formal_array_ptr)[10]) {  // { dg-bogus "" } s
20 void function1 (int (&formal_array_ref)[10]) {  // { dg-bogus "" } s
23 void function2 ()
25   int (*local_array_ptr)[10] = &array;          // { dg-bogus "" } s
28 void function3 ()
30   int (&local_array_ref)[10] = array;           // { dg-bogus "" } 
33 int main () { return 0; }