From: Jason Merrill Date: Fri, 21 Mar 2003 07:10:43 +0000 (-0500) Subject: re PR c++/9420 (incomplete type incorrectly reported) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b10af5a4195beb420ce352cb8a989acea810053b;p=gcc.git re PR c++/9420 (incomplete type incorrectly reported) PR c++/9420 * search.c (lookup_conversions): Call complete_type here. * call.c (implicit_conversion): Not here. From-SVN: r64649 --- 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 during overload resolution for E<0. +// This is wrong; the contents of B are not relevant, since we can't +// use its constructors (because we'd already be using a constructor for +// C). + +enum { E }; + +template struct A { + static const int a = (E < 0); +}; + +template class B { + A b; +}; + +struct C { + C(B); +}; + +int operator<(C, C); + +A c;