1 // Testcase for DR 975.
3 // { dg-do compile { target c++11 } }
6 struct A { int fn1(); const int& fn2(); };
7 struct B { int fn1(); long fn2(); };
9 template <class T> int f (T t) {
14 return t.fn2(); // { dg-error "inconsistent types" }
20 f(A()); // { dg-bogus "" } int and const int& are compatible
21 f(B()); // { dg-message "from here" } int and long are not