Be careful about comdat boundary in ICF (PR ipa/82352).
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / error4.C
blobbd73b2a766cad4e22a96536d06d1e7102b638dd3
1 // PR c++/49156
2 // { dg-do compile { target c++11 } }
4 template<typename T> T declval();
6 template<typename T>
7 struct S {
9   template<typename U>
10     static U get(const volatile T&);
12   template<typename U>
13     static decltype(*declval<U>()) get(...); // { dg-error "operator*" }
15   typedef decltype(get<T>(declval<T>())) type; // { dg-error "no match" }
18 struct X { };
20 S<X>::type x;
22 // { dg-prune-output "note" }