// PR c++/95009
-// { dg-do compile { target c++11 } }
+// { dg-do compile { target { c++11 && longlong64 } } }
struct false_type { static constexpr bool value = false; };
struct true_type { static constexpr bool value = true; };
struct A {
int i : 31;
- unsigned long l : 37;
+ unsigned long long l : 37;
} a;
void
static_assert (is_same<decltype(~a.i), int>::value, "");
static_assert (is_same<decltype((~a.i)), int>::value, "");
- static_assert (is_same<decltype(a.l), unsigned long>::value, "");
- static_assert (is_same<decltype((a.l)), unsigned long&>::value, "");
- static_assert (is_same<decltype(++a.l), unsigned long&>::value, "");
- static_assert (is_same<decltype((++a.l)), unsigned long&>::value, "");
- static_assert (is_same<decltype(a.l++), unsigned long>::value, "");
- static_assert (is_same<decltype((a.l++)), unsigned long>::value, "");
- static_assert (is_same<decltype(--a.l), unsigned long&>::value, "");
- static_assert (is_same<decltype((--a.l)), unsigned long&>::value, "");
- static_assert (is_same<decltype(a.l--), unsigned long>::value, "");
- static_assert (is_same<decltype((a.l--)), unsigned long>::value, "");
- static_assert (is_same<decltype(a.l += 1), unsigned long&>::value, "");
- static_assert (is_same<decltype((a.l += 1)), unsigned long&>::value, "");
- static_assert (is_same<decltype(a.l -= 1), unsigned long&>::value, "");
- static_assert (is_same<decltype((a.l -= 1)), unsigned long&>::value, "");
- static_assert (is_same<decltype(a.l *= 1), unsigned long&>::value, "");
- static_assert (is_same<decltype((a.l *= 1)), unsigned long&>::value, "");
- static_assert (is_same<decltype(+a.l), unsigned long>::value, "");
- static_assert (is_same<decltype((+a.l)), unsigned long>::value, "");
- static_assert (is_same<decltype(-a.l), unsigned long>::value, "");
- static_assert (is_same<decltype((-a.l)), unsigned long>::value, "");
- static_assert (is_same<decltype(~a.l), unsigned long>::value, "");
- static_assert (is_same<decltype((~a.l)), unsigned long>::value, "");
+ static_assert (is_same<decltype(a.l), unsigned long long>::value, "");
+ static_assert (is_same<decltype((a.l)), unsigned long long&>::value, "");
+ static_assert (is_same<decltype(++a.l), unsigned long long&>::value, "");
+ static_assert (is_same<decltype((++a.l)), unsigned long long&>::value, "");
+ static_assert (is_same<decltype(a.l++), unsigned long long>::value, "");
+ static_assert (is_same<decltype((a.l++)), unsigned long long>::value, "");
+ static_assert (is_same<decltype(--a.l), unsigned long long&>::value, "");
+ static_assert (is_same<decltype((--a.l)), unsigned long long&>::value, "");
+ static_assert (is_same<decltype(a.l--), unsigned long long>::value, "");
+ static_assert (is_same<decltype((a.l--)), unsigned long long>::value, "");
+ static_assert (is_same<decltype(a.l += 1), unsigned long long&>::value, "");
+ static_assert (is_same<decltype((a.l += 1)), unsigned long long&>::value, "");
+ static_assert (is_same<decltype(a.l -= 1), unsigned long long&>::value, "");
+ static_assert (is_same<decltype((a.l -= 1)), unsigned long long&>::value, "");
+ static_assert (is_same<decltype(a.l *= 1), unsigned long long&>::value, "");
+ static_assert (is_same<decltype((a.l *= 1)), unsigned long long&>::value, "");
+ static_assert (is_same<decltype(+a.l), unsigned long long>::value, "");
+ static_assert (is_same<decltype((+a.l)), unsigned long long>::value, "");
+ static_assert (is_same<decltype(-a.l), unsigned long long>::value, "");
+ static_assert (is_same<decltype((-a.l)), unsigned long long>::value, "");
+ static_assert (is_same<decltype(~a.l), unsigned long long>::value, "");
+ static_assert (is_same<decltype((~a.l)), unsigned long long>::value, "");
}