aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900324_03.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900324_03.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900324_03.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900324_03.C b/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900324_03.C
new file mode 100644
index 000000000..8c9989dbd
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900324_03.C
@@ -0,0 +1,22 @@
+// { dg-do run }
+// g++ 1.37.1 bug 900324_03
+
+// g++ is unable to correctly parse declarations of non-global function-pointer
+// variables and/or function-pointer formal parameters.
+
+// Cfront 2.0 passes this test.
+
+// keywords: syntax, function pointers, block local, formal
+
+void (*p0)(); // OK
+
+void function_0 ()
+{
+ void (*p1)(); // { dg-bogus "" } s
+}
+
+void function_1 (void (*p2)()); // { dg-bogus "" } s
+
+void (*function_2 ()) (); // OK
+
+int main () { return 0; }