summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-21 07:10:43 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-21 07:10:43 +0000
commit85cfd612ea41ece0d9c8341dffaac442ebf3e180 (patch)
tree196b424fafc70aa20f61e2689fd2c95d8b3d1fe1
parentec10b85339d1865c948a33866cc759635330c062 (diff)
downloadppe42-gcc-85cfd612ea41ece0d9c8341dffaac442ebf3e180.tar.gz
ppe42-gcc-85cfd612ea41ece0d9c8341dffaac442ebf3e180.zip
PR c++/9420
* search.c (lookup_conversions): Call complete_type here. * call.c (implicit_conversion): Not here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64649 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/g++.dg/template/overload1.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/overload1.C b/gcc/testsuite/g++.dg/template/overload1.C
new file mode 100644
index 00000000000..404fc2dfed5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/overload1.C
@@ -0,0 +1,23 @@
+// PR c++/9420
+// Bug: We were instantiating B<int> during overload resolution for E<0.
+// This is wrong; the contents of B<int> are not relevant, since we can't
+// use its constructors (because we'd already be using a constructor for
+// C).
+
+enum { E };
+
+template <typename T> struct A {
+ static const int a = (E < 0);
+};
+
+template <typename T> class B {
+ A<int> b;
+};
+
+struct C {
+ C(B<int>);
+};
+
+int operator<(C, C);
+
+A<int> c;
OpenPOWER on IntegriCloud