aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900406_02.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900406_02.C')
-rw-r--r--gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900406_02.C26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900406_02.C b/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900406_02.C
new file mode 100644
index 000000000..bcbffeb55
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900406_02.C
@@ -0,0 +1,26 @@
+// { dg-do run }
+// g++ bug 900406_02
+
+// g++ fails to correctly parse some type specifications within casts.
+
+// This results in incorrect errors being issued.
+
+// These errors are not issued for identical code by either cfront or
+// by gcc.
+
+// cfront 2.0 passes this test.
+
+// keywords: syntax, array types, casts
+
+int (*ipp)[];
+int (**ippp)[];
+
+int function ()
+{
+ ipp = (int (*)[]) 0; // OK
+ ippp = (int (**)[]) 0; // { dg-bogus "" } (syntax)
+ return 0;
+}
+
+int main () { return 0; }
+