aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/parse12.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/parse12.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/parse12.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/parse12.C b/gcc/testsuite/g++.old-deja/g++.jason/parse12.C
new file mode 100644
index 00000000000..7829a8b1b0d
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/parse12.C
@@ -0,0 +1,17 @@
+// PRMS Id: 6821
+
+struct A {
+ int operator()(int i) { return i; }
+};
+
+struct B {
+ A* p;
+ int f () { return (*p)(42); } // gets bogus error
+};
+
+main ()
+{
+ B b = { new A };
+
+ return b.f () != 42;
+}