]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/g++.dg/ext/int128-8.C
libstdc++: Avoid bogus warning in std::vector::insert [PR107852]
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / ext / int128-8.C
CommitLineData
7b30f13b 1// PR c++/108099
3907147a 2// { dg-do compile { target { c++11 && int128 } } }
7b30f13b
JM
3// { dg-options "" }
4
5using u128 = unsigned __int128_t;
6using s128 = signed __int128_t;
7template <typename T, T v> struct integral_constant {
8 static constexpr T value = v;
9};
10typedef integral_constant <bool, false> false_type;
11typedef integral_constant <bool, true> true_type;
12template <class T, class U>
13struct is_same : false_type {};
14template <class T>
15struct is_same <T, T> : true_type {};
16static_assert (is_same <__int128, s128>::value, "");
17static_assert (is_same <signed __int128, s128>::value, "");
18static_assert (is_same <__int128_t, s128>::value, "");
19static_assert (is_same <unsigned __int128, u128>::value, ""); // { dg-bogus "" "" { xfail *-*-* } }
20static_assert (is_same <__uint128_t, u128>::value, ""); // { dg-bogus "" "" { xfail *-*-* } }
21static_assert (sizeof (s128) == sizeof (__int128), "");
22static_assert (sizeof (u128) == sizeof (unsigned __int128), "");
23static_assert (s128(-1) < 0, "");
24static_assert (u128(-1) > 0, "");