gcc/testsuite/g++.dg/template/pr71826.C
raw| 1 | // PR c++/71826 ICE |
| 2 | // PR c++/15272 Invalid ambiguous |
| 3 | // { dg-do compile } |
| 4 | |
| 5 | // 15272, we don't search the dependent base |
| 6 | template <class> struct A { int i; }; |
| 7 | |
| 8 | // We bind to B::i at parse time |
| 9 | struct B { void i () {} }; |
| 10 | |
| 11 | template <class T> struct C : A <T>, B |
| 12 | { |
| 13 | void f () { i (); } // here |
| 14 | }; |
| 15 | |
| 16 | int |
| 17 | main () |
| 18 | { |
| 19 | C <int> c; |
| 20 | c.f (); |
| 21 | return 0; |
| 22 | } |