1 // { dg-options "-w" }
2 // PR c++/9420
3 // Bug: We were instantiating B<int> during overload resolution for E<0.
4 // This is wrong; the contents of B<int> are not relevant, since we can't
5 // use its constructors (because we'd already be using a constructor for
6 // C).
7 
8 enum { E };
9 
10 template <typename T> struct A {
11   static const int a = (E < 0);
12 };
13 
14 template <typename T> class B {
15   A<int> b;
16 };
17 
18 struct C {
19   C(B<int>);
20 };
21 
22 int operator<(C, C);
23 
24 A<int> c;
25