summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-11 14:21:08 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-11 14:21:08 +0000
commit0201751dcb30ca6fce61f1cd02ea7aa5574fad2d (patch)
tree1cab3f6d0f23e715bc73162356fc225ef41a11ca
parent5851ed872f873d775ddba910d9326eebe79f8049 (diff)
downloadppe42-gcc-0201751dcb30ca6fce61f1cd02ea7aa5574fad2d.tar.gz
ppe42-gcc-0201751dcb30ca6fce61f1cd02ea7aa5574fad2d.zip
* g++.old-deja/g++.pt/explicit82.C: New test.
* g++.old-deja/g++.pt/explicit83.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36316 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit82.C18
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit83.C35
3 files changed, 58 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 73b488939ca..fdd07e07193 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old-deja/g++.pt/explicit82.C: New test.
+ * g++.old-deja/g++.pt/explicit83.C: New test.
+
2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
* gcc.dg/asm-names.c: New test.
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit82.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit82.C
new file mode 100644
index 00000000000..844ff94cd59
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit82.C
@@ -0,0 +1,18 @@
+// Build don't link:
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 7 Sep 2000 <nathan@codesourcery.com>
+
+// Bug 508. We failed to set/clear lastiddecl appropriately for
+// operator names.
+
+struct A {};
+
+template <typename N> void foo (A, int);
+template <typename N> void operator<< (A, int);
+
+int main()
+{
+ A a;
+ operator<< <bool>(a, 0);
+ foo <bool>(a, 0);
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit83.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit83.C
new file mode 100644
index 00000000000..dd6e7660517
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit83.C
@@ -0,0 +1,35 @@
+// Build don't link:
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 7 Sep 2000 <nathan@codesourcery.com>
+
+// Bug 512. Conversion operator functions in template_id's were always
+// being looked up in global scope.
+
+class C
+{
+public:
+
+ template <typename T>
+ void f () {}
+
+ template<typename T>
+ operator int ()
+ { return 0;
+ }
+};
+
+template void C::f <int>();
+
+template C::operator int<float> ();
+
+template C::operator int<double> ();
+
+typedef int (C::* ptrmem_t) ();
+
+template<ptrmem_t U, ptrmem_t V>
+void foo ()
+{
+}
+
+template void
+foo<&C::operator int<float>, &C::operator int<double> > ();
OpenPOWER on IntegriCloud