summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.bugs/900520_05.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.bugs/900520_05.C')
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900520_05.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900520_05.C b/gcc/testsuite/g++.old-deja/g++.bugs/900520_05.C
new file mode 100755
index 0000000..d628ae3
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900520_05.C
@@ -0,0 +1,23 @@
+// g++ 1.37.1 bug 900520_05
+
+// The following legal code gets syntax errors from g++.
+
+// keywords: syntax, unimplemented, operator new, initialization, pointer types
+
+struct struct_0 {
+};
+
+char *cp;
+static struct_0 *sp;
+
+void test0 ()
+{
+ new char * (cp); // gets bogus error
+}
+
+void test1 ()
+{
+ new struct_0 * (sp); // gets bogus error
+}
+
+int main () { return 0; }