ipa-cp: Perform operations in the appropriate types (PR 118097)
[gcc.git] / gcc / testsuite / g++.dg / template / dr1391-3.C
blob0f5879704c1d1a767d612e9104efe511201853a3
1 // DR 1391
3 template <class T> struct Z {
4   typedef typename T::x xx;
5 };
6 template <class T> typename Z<T>::xx f(void *, T);
7 template <class T> void f(int, T);
8 struct A {} a;
9 int main() {
10   f(1, a); // If the implementation rules out the first overload
11   // because of the invalid conversion from int to void*,
12   // the error instantiating Z<A> will be avoided