summaryrefslogtreecommitdiff
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.C18
1 files changed, 18 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 000000000..8988cebc8
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/parse12.C
@@ -0,0 +1,18 @@
+// { dg-do run }
+// PRMS Id: 6821
+
+struct A {
+ int operator()(int i) { return i; }
+};
+
+struct B {
+ A* p;
+ int f () { return (*p)(42); } // { dg-bogus "" }
+};
+
+int main ()
+{
+ B b = { new A };
+
+ return b.f () != 42;
+}