summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-29 00:16:05 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-29 00:16:05 +0000
commit8223a66b225d8e45dfa90a3f657882683c3331f7 (patch)
tree33ff78e64cfd8923493efdc5cccd2b88af4a72ed /gcc/testsuite
parent9a755727a963ba66095e1e3ac618d7033c1353ed (diff)
downloadgcc-8223a66b225d8e45dfa90a3f657882683c3331f7.tar.gz
PR c++/21340
* method.c (implicitly_declare_fn): Clear processing_template_decl when generating implicit declaration. PR c++/21340 * g++.dg/init/ctor6.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100306 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/init/ctor6.C20
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f9a5e6a1989..a85e6b5d6b6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-28 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/21340
+ * g++.dg/init/ctor6.C: New test.
+
2005-05-29 Jan Hubicka <jh@suse.cz>
* gcc.c-torture/compile/pr21562.c: New.
diff --git a/gcc/testsuite/g++.dg/init/ctor6.C b/gcc/testsuite/g++.dg/init/ctor6.C
new file mode 100644
index 00000000000..a25ecab1fa7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/ctor6.C
@@ -0,0 +1,20 @@
+// PR c++/21340
+
+struct Base{};
+struct Iterator : virtual Base {};
+bool operator==(const Iterator&, const Iterator&);
+struct IteratorI : Iterator {};
+struct Obj
+{
+ bool operator==(const Obj&) const;
+};
+template <int>bool dummy()
+{
+ Obj lhs, rhs;
+ return lhs == rhs;
+}
+int
+main(int argc, char** argv)
+{
+ IteratorI* it2 = new IteratorI();
+}