This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Testcases for name-lookup bugs
- From: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 13 Jul 2004 01:56:04 +0200 (CEST)
- Subject: [patch] Testcases for name-lookup bugs
The following patch adds three testcases for name-lookup bugs
that were fixed by Mark's patch
http://gcc.gnu.org/ml/gcc-cvs/2004-07/msg00338.html
Committed to mainline as obvious.
Regards,
Volker
2004-07-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/5402
* g++.dg/lookup/name-clash1.C: New test.
PR c++/9777
* g++.dg/lookup/name-clash2.C: New test.
PR c++/12102
* g++.dg/lookup/name-clash3.C: New test.
Index: g++.dg/lookup/name-clash1.C
===================================================================
RCS file: g++.dg/lookup/name-clash1.C
diff -N g++.dg/lookup/name-clash1.C
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ g++.dg/lookup/name-clash1.C 12 Jul 2004 23:50:02 -0000
@@ -0,0 +1,20 @@
+// { dg-do compile }
+
+// Origin: Jakub Jelinek <jakub@redhat.com>
+// PR c++/5402
+
+struct A
+{
+ struct B {};
+};
+
+struct C
+{
+ typedef int B;
+};
+
+struct D : A
+{
+ struct E : C {};
+ struct B {};
+};
Index: g++.dg/lookup/name-clash2.C
===================================================================
RCS file: g++.dg/lookup/name-clash2.C
diff -N g++.dg/lookup/name-clash2.C
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ g++.dg/lookup/name-clash2.C 12 Jul 2004 23:50:02 -0000
@@ -0,0 +1,16 @@
+// { dg-do compile }
+
+// Origin: Sven Bilke <bilkes@mail.nih.gov>
+// PR c++/9777
+
+struct A
+{
+ struct X {};
+ struct Y { void X(); };
+};
+
+struct B : A
+{
+ struct Y : A::Y {};
+ struct X : A::X {};
+};
Index: g++.dg/lookup/name-clash3.C
===================================================================
RCS file: g++.dg/lookup/name-clash3.C
diff -N g++.dg/lookup/name-clash3.C
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ g++.dg/lookup/name-clash3.C 12 Jul 2004 23:50:02 -0000
@@ -0,0 +1,14 @@
+// { dg-do compile }
+
+// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+// PR c++/12102
+
+struct A
+{
+ struct C {} C;
+};
+
+struct B : A
+{
+ struct C {} C;
+};
===================================================================