Debian Codegraph @

gcc/testsuite/g++.dg/ext/int128-4.C

raw
1 // Test for int128 arithmetic conversions.
2 // { dg-do compile { target int128 } }
3 // { dg-require-effective-target c++11 }
4 // { dg-options "" }
5
6 template <class T, class U> struct same;
7 template <class T> struct same<T,T> { };
8 #define assert_same(T,U) (same<T,U>())
9
10 int main()
11 {
12 long long ll;
13 unsigned long long ull;
14 __int128 i8;
15 unsigned __int128 u8;
16 assert_same (decltype (ll+i8), __int128);
17 assert_same (decltype (ull+i8), __int128);
18 assert_same (decltype (ll+u8), unsigned __int128);
19 assert_same (decltype (ull+u8), unsigned __int128);
20 }