2 // { dg-do compile { target c++11 } }
3 // { dg-options "-fno-ipa-icf" }
5 template<typename T, typename U> struct same_type;
6 template<typename T> struct same_type<T, T> {};
8 int const f() { return 0; }
10 int &&r = f(); // binding "int&&" to "int" should succeed
11 same_type<decltype(f()), int> s1;
12 same_type<decltype(0,f()), int> s2;
15 T const g() { return 0; }
18 same_type<decltype(g<int>()), int> s3;
19 same_type<decltype(0,g<int>()), int> s4;