summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/scope4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.law/scope4.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/scope4.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.law/scope4.C b/gcc/testsuite/g++.old-deja/g++.law/scope4.C
new file mode 100644
index 000000000..dfa73d312
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.law/scope4.C
@@ -0,0 +1,16 @@
+// { dg-do assemble }
+// GROUPS passed scoping
+// local-class file
+// From: daniels@sugar.neosoft.com (Brad Daniels)
+// Date: Thu, 5 Aug 93 15:36:36 CDT
+// Subject: Bug in g++ 2.4.5: Can't touch nested class identifier inside its members
+// Message-ID: <9308051536.AA06115@NeoSoft.Com>
+
+void f() {
+ class foo {
+ int x;
+ public:
+ foo() : x(1) {}
+ int bar() { foo p; return p.x; }
+ };
+}