* g++.old-deja/g++.other/typedef8.C: New test.
authorNathan Sidwell <nathan@codesourcery.com>
Fri, 18 Aug 2000 09:49:40 +0000 (09:49 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Fri, 18 Aug 2000 09:49:40 +0000 (09:49 +0000)
From-SVN: r35780

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/typedef8.C [new file with mode: 0644]

index 34d1f05..dcc2190 100644 (file)
@@ -1,5 +1,9 @@
 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
 
+       * g++.old-deja/g++.other/typedef8.C: New test.
+
+2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
+
        * g++.old-deja/g++.benjamin/13478.C: Mark candidate.
        * g++.old-deja/g++.mike/net36.C: Mark candidate.
        * g++.old-deja/g++.robertl/eb131.C: Mark candidate.
diff --git a/gcc/testsuite/g++.old-deja/g++.other/typedef8.C b/gcc/testsuite/g++.old-deja/g++.other/typedef8.C
new file mode 100644 (file)
index 0000000..ce9d0bd
--- /dev/null
@@ -0,0 +1,26 @@
+// Build don't link:
+// 
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 17 Aug 2000 <nathan@codesourcery.com>
+
+// bug 39. We'd generated bogus errors when using a typedef of a nested class.
+
+struct X1
+{
+  typedef struct {
+  } MyStruct1;
+  typedef struct M2 {
+  } MyStruct2;
+};
+
+X1::MyStruct1 foo()
+{
+X1::MyStruct1 m1;
+return m1;
+}
+
+X1::MyStruct2 baz()
+{
+X1::MyStruct2 m1;
+return m1;
+}