integer-pack2.C: Require int32 effective target.
authorJakub Jelinek <jakub@redhat.com>
Wed, 24 May 2017 19:11:01 +0000 (21:11 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 24 May 2017 19:11:01 +0000 (21:11 +0200)
* g++.dg/ext/integer-pack2.C: Require int32 effective target.
Don't include limits.h.
(w): Conditionalize on long long wider than int.  Use
1LL << (__SIZEOF_INT__ * __CHAR_BIT__) instead of
-9223372036854775808.
(x): Use __INT_MAX__ instead of INT_MAX.

From-SVN: r248427

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/integer-pack2.C

index b6f824b21fafb0136514a6341f903d6c5c75e575..9308ae15ae8374c91b1642bceae6d191ee38e598 100644 (file)
@@ -1,3 +1,12 @@
+2017-05-24  Jakub Jelinek  <jakub@redhat.com>
+
+       * g++.dg/ext/integer-pack2.C: Require int32 effective target.
+       Don't include limits.h.
+       (w): Conditionalize on long long wider than int.  Use
+       1LL << (__SIZEOF_INT__ * __CHAR_BIT__) instead of
+       -9223372036854775808.
+       (x): Use __INT_MAX__ instead of INT_MAX.
+
 2017-05-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/66094
index 370dbebfa10d82d09e1f2adcd964199b83b530e2..406e195574c3db552f1acd7dcb778c48930f5c0f 100644 (file)
@@ -1,12 +1,12 @@
-// { dg-do compile { target c++11 } }
+// { dg-do compile { target { c++11 && int32 } } }
 // { dg-options -w }
 
-#include <limits.h>
-
 template<typename T, T...> struct integer_sequence { };
 template<typename T, T num>
  using make_integer_sequence = integer_sequence<T, __integer_pack(num)...>; // { dg-error "argument" }
 
-make_integer_sequence<int, -9223372036854775808> w;
-make_integer_sequence<int, INT_MAX> x;    // { dg-message "required" }
+#if __SIZEOF_LONG_LONG__ > __SIZEOF_INT__
+make_integer_sequence<int, 1LL << (__SIZEOF_INT__ * __CHAR_BIT__)> w;
+#endif
+make_integer_sequence<int, __INT_MAX__> x; // { dg-message "required" }
 make_integer_sequence<int, -2147483650> y; // { dg-message "required" }