From 812424036177ad5ed0d460195525494a1cfdcc17 Mon Sep 17 00:00:00 2001 From: Volker Reichelt Date: Mon, 12 Jul 2004 23:51:18 +0000 Subject: [PATCH] re PR c++/5402 (ICE in pop_binding) 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. From-SVN: r84587 --- gcc/testsuite/ChangeLog | 11 +++++++++++ gcc/testsuite/g++.dg/lookup/name-clash1.C | 20 ++++++++++++++++++++ gcc/testsuite/g++.dg/lookup/name-clash2.C | 16 ++++++++++++++++ gcc/testsuite/g++.dg/lookup/name-clash3.C | 14 ++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 gcc/testsuite/g++.dg/lookup/name-clash1.C create mode 100644 gcc/testsuite/g++.dg/lookup/name-clash2.C create mode 100644 gcc/testsuite/g++.dg/lookup/name-clash3.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7abecb68e50..6b873b85830 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2004-07-12 Volker Reichelt + + 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. + 2004-07-12 Giovanni Bajo * g++.dg/lookup/new2.C: New test. diff --git a/gcc/testsuite/g++.dg/lookup/name-clash1.C b/gcc/testsuite/g++.dg/lookup/name-clash1.C new file mode 100644 index 00000000000..6ee4be350a5 --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/name-clash1.C @@ -0,0 +1,20 @@ +// { dg-do compile } + +// Origin: Jakub Jelinek +// PR c++/5402 + +struct A +{ + struct B {}; +}; + +struct C +{ + typedef int B; +}; + +struct D : A +{ + struct E : C {}; + struct B {}; +}; diff --git a/gcc/testsuite/g++.dg/lookup/name-clash2.C b/gcc/testsuite/g++.dg/lookup/name-clash2.C new file mode 100644 index 00000000000..c200eeebd33 --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/name-clash2.C @@ -0,0 +1,16 @@ +// { dg-do compile } + +// Origin: Sven Bilke +// PR c++/9777 + +struct A +{ + struct X {}; + struct Y { void X(); }; +}; + +struct B : A +{ + struct Y : A::Y {}; + struct X : A::X {}; +}; diff --git a/gcc/testsuite/g++.dg/lookup/name-clash3.C b/gcc/testsuite/g++.dg/lookup/name-clash3.C new file mode 100644 index 00000000000..eb52a7c10c7 --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/name-clash3.C @@ -0,0 +1,14 @@ +// { dg-do compile } + +// Origin: Volker Reichelt +// PR c++/12102 + +struct A +{ + struct C {} C; +}; + +struct B : A +{ + struct C {} C; +}; -- 2.30.2