From c915eee640ea7fb26825b8e59a1d3c455b7c601a Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Fri, 9 Dec 2016 17:38:17 +0000 Subject: [PATCH] gcc/testsuite/ChangeLog: on arm-unknown-linux-gnueabi (and likely other ILP32) targets. From-SVN: r243497 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/attr-alloc_size-3.c | 29 +++++++++++++----------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index defbd5ecc24..2326b4e88ce 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2016-12-09 Martin Sebor + + on arm-unknown-linux-gnueabi (and likely other ILP32) targets. + 2016-12-09 Andre Vieira PR rtl-optimization/78255 diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-3.c b/gcc/testsuite/gcc.dg/attr-alloc_size-3.c index 284127f1338..95a0c02ca2e 100644 --- a/gcc/testsuite/gcc.dg/attr-alloc_size-3.c +++ b/gcc/testsuite/gcc.dg/attr-alloc_size-3.c @@ -65,11 +65,11 @@ void* f_llong_2 (long long, long long) ALLOC_SIZE (1, 2); void* f_size_1 (size_t) ALLOC_SIZE (1); void* f_size_2 (size_t, size_t) ALLOC_SIZE (1, 2); -unsigned long long -unsigned_range (unsigned long long min, unsigned long long max) +size_t +unsigned_range (size_t min, size_t max) { - extern unsigned long long random_unsigned_value (void); - unsigned long long val = random_unsigned_value (); + extern size_t random_unsigned_value (void); + size_t val = random_unsigned_value (); if (val < min || max < val) val = min; return val; } @@ -83,11 +83,11 @@ signed_range (long long min, long long max) return val; } -unsigned long long -unsigned_anti_range (unsigned long long min, unsigned long long max) +size_t +unsigned_anti_range (size_t min, size_t max) { - extern unsigned long long random_unsigned_value (void); - unsigned long long val = random_unsigned_value (); + extern size_t random_unsigned_value (void); + size_t val = random_unsigned_value (); if (min <= val && val <= max) val = min - 1; return val; @@ -240,9 +240,8 @@ test_ushrt_cst (void) sink (f_ushrt_2 (0, max)); sink (f_ushrt_2 (max, 0)); -#if USHRT_MAX < SIZE_MAX - sink (f_ushrt_2 (max, max)); -#endif + if (max < SIZE_MAX && (size_t)max * max < SIZE_MAX / 2) + sink (f_ushrt_2 (max, max)); } void @@ -295,8 +294,12 @@ test_uint_cst (void) sink (f_uint_1 (0)); sink (f_uint_1 (1)); - sink (f_uint_1 (max - 1)); - sink (f_uint_1 (max)); + + if (max < SIZE_MAX) + { + sink (f_uint_1 (max - 1)); + sink (f_uint_1 (max)); + } } void -- 2.30.2