diff options
author | Martin Sebor <msebor@redhat.com> | 2017-01-12 18:35:19 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2017-01-12 11:35:19 -0700 |
commit | dcb5624309a5aa31e8713e8fd160e92edc544c71 (patch) | |
tree | 1d62aad3227090dbf4337a14c959fc2443be994d | |
parent | b7431c206e240162e254023e1d216d13ba74c662 (diff) | |
download | gcc-dcb5624309a5aa31e8713e8fd160e92edc544c71.zip gcc-dcb5624309a5aa31e8713e8fd160e92edc544c71.tar.gz gcc-dcb5624309a5aa31e8713e8fd160e92edc544c71.tar.bz2 |
PR testsuite/791051 - FAIL: gcc.dg/attr-alloc_size-4.c (test for warnings, line 140)
gcc/testsuite/ChangeLog:
* gcc.dg/attr-alloc_size-4.c: Avoid false negatives due to bug 79054.
From-SVN: r244380
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/attr-alloc_size-4.c | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3cc4eaf..a30c639 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-01-12 Martin Sebor <msebor@redhat.com> + + PR testsuite/791051 + * gcc.dg/attr-alloc_size-4.c: Avoid false negatives due to bug 79054. + 2017-01-12 David Edelsohn <dje.gcc@gmail.com> * gcc.dg/pr78768.c: Require LTO. diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-4.c b/gcc/testsuite/gcc.dg/attr-alloc_size-4.c index 5ce593e..d50b436 100644 --- a/gcc/testsuite/gcc.dg/attr-alloc_size-4.c +++ b/gcc/testsuite/gcc.dg/attr-alloc_size-4.c @@ -137,7 +137,12 @@ test_int_range (int n) sink (f_int_1 (SAR (-3, 123))); sink (f_int_1 (SAR (-4, 1234))); /* { dg-warning "argument 1 range \\\[1235, \[0-9\]+\\\] exceeds maximum object size 1234" } */ sink (f_int_1 (SAR (min + 1, 1233))); - sink (f_int_1 (SAR (min + 2, 1235))); /* { dg-warning "argument 1 range \\\[1236, \[0-9\]+\\\] exceeds maximum object size 1234" } */ + +#if __SIZEOF_LONG__ == 8 + /* Avoid failures described in bug 79051. */ + sink (f_int_1 (SAR (min + 2, 1235))); /* { dg-warning "argument 1 range \\\[1236, \[0-9\]+\\\] exceeds maximum object size 1234" "" { target { lp64 } } } */ +#endif + sink (f_int_1 (SAR (0, max))); /* { dg-warning "argument 1 range \\\[-\[0-9\]*, -1\\\] is negative" } */ /* The range below includes zero which would be diagnosed by -Walloc-size-zero but since all other values are negative it |