From: Martin Sebor Date: Sat, 7 Jan 2017 19:45:33 +0000 (+0000) Subject: attr-alloc_size-3.c: Remove regex made redundant by r243461. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42002dfec374c429569796c275001f1b0635e674;p=gcc.git attr-alloc_size-3.c: Remove regex made redundant by r243461. gcc/testsuite/ChangeLog: * gcc.dg/attr-alloc_size-3.c: Remove regex made redundant by r243461. * gcc.dg/attr-alloc_size-4.c: Same. From-SVN: r244197 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0d5aa52cc0a..340ec410539 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-01-07 Martin Sebor + + * gcc.dg/attr-alloc_size-3.c: Remove regex made redundant by r243461. + * gcc.dg/attr-alloc_size-4.c: Same. + 2017-01-07 Andre Vehreschild * gfortran.dg/coarray/ptr_comp_1.f08: New test. diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-3.c b/gcc/testsuite/gcc.dg/attr-alloc_size-3.c index 95a0c02ca2e..a124a8791ad 100644 --- a/gcc/testsuite/gcc.dg/attr-alloc_size-3.c +++ b/gcc/testsuite/gcc.dg/attr-alloc_size-3.c @@ -410,21 +410,21 @@ test_size_cst (void) sink (f_size_1 (0)); sink (f_size_1 (1)); - sink (f_size_1 (max - 1)); /* { dg-warning "argument 1 value .\[0-9\]+\[lu\]*. exceeds maximum object size \[0-9\]+" } */ - sink (f_size_1 (max)); /* { dg-warning "argument 1 value .\[0-9\]+\[lu\]*. exceeds maximum object size \[0-9\]+" } */ + sink (f_size_1 (max - 1)); /* { dg-warning "argument 1 value .\[0-9\]+. exceeds maximum object size \[0-9\]+" } */ + sink (f_size_1 (max)); /* { dg-warning "argument 1 value .\[0-9\]+. exceeds maximum object size \[0-9\]+" } */ - sink (f_size_2 (0, max - 1)); /* { dg-warning "argument 2 value .\[0-9\]+\[lu\]*. exceeds maximum object size \[0-9\]+" } */ - sink (f_size_2 (max - 1, 0)); /* { dg-warning "argument 1 value .\[0-9\]+\[lu\]*. exceeds maximum object size \[0-9\]+" } */ - sink (f_size_2 (1, max - 1)); /* { dg-warning "argument 2 value .\[0-9\]+\[lu\]*. exceeds maximum object size \[0-9\]+" } */ - sink (f_size_2 (max - 1, 1)); /* { dg-warning "argument 1 value .\[0-9\]+\[lu\]*. exceeds maximum object size \[0-9\]+" } */ - sink (f_size_2 (max - 1, max - 1)); /* { dg-warning "argument 1 value .\[0-9\]+\[lu\]*. exceeds maximum object size \[0-9\]+" } */ - /* { dg-warning "argument 2 value .\[0-9\]+\[lu\]*. exceeds maximum object size \[0-9\]+" "argument 2" { target *-*-* } .-1 } */ + sink (f_size_2 (0, max - 1)); /* { dg-warning "argument 2 value .\[0-9\]+. exceeds maximum object size \[0-9\]+" } */ + sink (f_size_2 (max - 1, 0)); /* { dg-warning "argument 1 value .\[0-9\]+. exceeds maximum object size \[0-9\]+" } */ + sink (f_size_2 (1, max - 1)); /* { dg-warning "argument 2 value .\[0-9\]+. exceeds maximum object size \[0-9\]+" } */ + sink (f_size_2 (max - 1, 1)); /* { dg-warning "argument 1 value .\[0-9\]+. exceeds maximum object size \[0-9\]+" } */ + sink (f_size_2 (max - 1, max - 1)); /* { dg-warning "argument 1 value .\[0-9\]+. exceeds maximum object size \[0-9\]+" } */ + /* { dg-warning "argument 2 value .\[0-9\]+. exceeds maximum object size \[0-9\]+" "argument 2" { target *-*-* } .-1 } */ - sink (f_size_2 (0, max)); /* { dg-warning "argument 2 value .\[0-9\]+\[lu\]*. exceeds maximum object size \[0-9\]+" } */ - sink (f_size_2 (max, 0)); /* { dg-warning "argument 1 value .\[0-9\]+\[lu\]*. exceeds maximum object size \[0-9\]+" } */ + sink (f_size_2 (0, max)); /* { dg-warning "argument 2 value .\[0-9\]+. exceeds maximum object size \[0-9\]+" } */ + sink (f_size_2 (max, 0)); /* { dg-warning "argument 1 value .\[0-9\]+. exceeds maximum object size \[0-9\]+" } */ - sink (f_size_2 (max / 2, 2)); /* { dg-warning "product .\[0-9\]+\[lu\]* \\* \[0-9\]+\[lu\]*. of arguments 1 and 2 exceeds maximum object size \[0-9\]+" } */ - sink (f_size_2 (max / 2, 3)); /* { dg-warning "product .\[0-9\]+\[lu\]* \\* \[0-9\]+\[lu\]*. of arguments 1 and 2 exceeds .SIZE_MAX." } */ + sink (f_size_2 (max / 2, 2)); /* { dg-warning "product .\[0-9\]+ \\* \[0-9\]+. of arguments 1 and 2 exceeds maximum object size \[0-9\]+" } */ + sink (f_size_2 (max / 2, 3)); /* { dg-warning "product .\[0-9\]+ \\* \[0-9\]+. of arguments 1 and 2 exceeds .SIZE_MAX." } */ } void @@ -445,7 +445,7 @@ test_size_range (size_t ui, ptrdiff_t si) sink (f_size_1 (UAR (1, 1))); /* Since the only valid argument in the anti-range below is zero a warning is expected even though -Walloc-zero is not specified. */ - sink (f_size_1 (UAR (1, umax / 2))); /* { dg-warning "argument 1 range \\\[\[0-9\]+\[lu\]*, \[0-9\]+\[lu\]*\\\] exceeds maximum object size " } */ + sink (f_size_1 (UAR (1, umax / 2))); /* { dg-warning "argument 1 range \\\[\[0-9\]+, \[0-9\]+\\\] exceeds maximum object size " } */ /* The only valid argument in this range is 1. */ sink (f_size_1 (UAR (2, umax / 2))); @@ -456,14 +456,14 @@ test_size_range (size_t ui, ptrdiff_t si) sink (f_size_2 (umax / 2, ui)); sink (f_size_2 (umax / 2, si)); - sink (f_size_2 (UR (0, 1), umax)); /* { dg-warning "argument 2 value .\[0-9\]+\[lu\]*. exceeds maximum object size " } */ + sink (f_size_2 (UR (0, 1), umax)); /* { dg-warning "argument 2 value .\[0-9\]+. exceeds maximum object size " } */ sink (f_size_2 (UR (0, 1), umax / 2)); sink (f_size_2 (UR (0, umax / 2), umax / 2)); - sink (f_size_2 (UR (umax / 2 + 1, umax / 2 + 2), ui)); /* { dg-warning "argument 1 range \\\[\[0-9\]+\[lu\]*, \[0-9\]+\[lu\]*\\\] exceeds maximum object size " } */ - sink (f_size_2 (ui, UR (umax / 2 + 1, umax / 2 + 2))); /* { dg-warning "argument 2 range \\\[\[0-9\]+\[lu\]*, \[0-9\]+\[lu\]*\\\] exceeds maximum object size " } */ - sink (f_size_2 (UR (umax / 2 + 1, umax), UR (umax / 2 + 1, umax))); /* { dg-warning "argument 1 range \\\[\[0-9\]+\[lu\]*, \[0-9\]+\[lu\]*\\\] exceeds maximum object size " } */ -/* { dg-warning "argument 2 range \\\[\[0-9\]+\[lu\]*, \[0-9\]+\[lu\]*\\\] exceeds maximum object size " "argument 2" { target *-*-* } .-1 } */ + sink (f_size_2 (UR (umax / 2 + 1, umax / 2 + 2), ui)); /* { dg-warning "argument 1 range \\\[\[0-9\]+, \[0-9\]+\\\] exceeds maximum object size " } */ + sink (f_size_2 (ui, UR (umax / 2 + 1, umax / 2 + 2))); /* { dg-warning "argument 2 range \\\[\[0-9\]+, \[0-9\]+\\\] exceeds maximum object size " } */ + sink (f_size_2 (UR (umax / 2 + 1, umax), UR (umax / 2 + 1, umax))); /* { dg-warning "argument 1 range \\\[\[0-9\]+, \[0-9\]+\\\] exceeds maximum object size " } */ +/* { dg-warning "argument 2 range \\\[\[0-9\]+, \[0-9\]+\\\] exceeds maximum object size " "argument 2" { target *-*-* } .-1 } */ sink (f_size_2 (SR (smin, 1), 1)); sink (f_size_2 (SR (smin, 1), umax / 2)); diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-4.c b/gcc/testsuite/gcc.dg/attr-alloc_size-4.c index 0a07d6e39e8..6b70a85835c 100644 --- a/gcc/testsuite/gcc.dg/attr-alloc_size-4.c +++ b/gcc/testsuite/gcc.dg/attr-alloc_size-4.c @@ -129,7 +129,7 @@ test_int_range (int n) sink (f_int_1 (SR (min, 1234))); sink (f_int_1 (SR (-2, -1))); /* { dg-warning "argument 1 range \\\[-2, -1\\\] is negative" } */ sink (f_int_1 (SR (1235, 2345))); /* { dg-warning "argument 1 range \\\[1235, 2345\\\] exceeds maximum object size 1234" } */ - sink (f_int_1 (SR (max - 1, max))); /* { dg-warning "argument 1 range \\\[\[0-9\]+\[lu\]*, \[0-9\]+\[lu\]*\\\] exceeds maximum object size 1234" } */ + sink (f_int_1 (SR (max - 1, max))); /* { dg-warning "argument 1 range \\\[\[0-9\]+, \[0-9\]+\\\] exceeds maximum object size 1234" } */ sink (f_int_1 (SAR (-1, 1))); sink (f_int_1 (SAR (-2, 12))); @@ -149,12 +149,12 @@ test_size_cst (void) sink (f_size_2 ( 0, 1234)); sink (f_size_2 ( 1, 1234)); - sink (f_size_2 ( 2, 1234)); /* { dg-warning "product .2\[lu\]* \\* 1234\[lu\]*. of arguments 1 and 2 exceeds maximum object size \[0-9\]+" } */ - sink (f_size_2 (1234, 1234)); /* { dg-warning "product .1234\[lu\]* \\* 1234\[lu\]*. of arguments 1 and 2 exceeds maximum object size 1234" } */ - sink (f_size_2 (1235, 1234)); /* { dg-warning "argument 1 value .1235\[lu\]*. exceeds maximum object size 1234" } */ - sink (f_size_2 (1234, 1235)); /* { dg-warning "argument 2 value .1235\[lu\]*. exceeds maximum object size 1234" } */ - sink (f_size_2 (1234, max)); /* { dg-warning "argument 2 value .\[0-9\]+\[lu\]*. exceeds maximum object size 1234" } */ - sink (f_size_2 (max, 1234)); /* { dg-warning "argument 1 value .\[0-9\]+\[lu\]*. exceeds maximum object size 1234" } */ + sink (f_size_2 ( 2, 1234)); /* { dg-warning "product .2 \\* 1234. of arguments 1 and 2 exceeds maximum object size \[0-9\]+" } */ + sink (f_size_2 (1234, 1234)); /* { dg-warning "product .1234 \\* 1234. of arguments 1 and 2 exceeds maximum object size 1234" } */ + sink (f_size_2 (1235, 1234)); /* { dg-warning "argument 1 value .1235. exceeds maximum object size 1234" } */ + sink (f_size_2 (1234, 1235)); /* { dg-warning "argument 2 value .1235. exceeds maximum object size 1234" } */ + sink (f_size_2 (1234, max)); /* { dg-warning "argument 2 value .\[0-9\]+. exceeds maximum object size 1234" } */ + sink (f_size_2 (max, 1234)); /* { dg-warning "argument 1 value .\[0-9\]+. exceeds maximum object size 1234" } */ } void @@ -172,7 +172,7 @@ test_size_range (size_t n) sink (f_size_1 (UAR (1, 1))); /* Since the only valid argument in the anti-range below is zero a warning is expected even though -Walloc-zero is not specified. */ - sink (f_size_1 (UAR (1, 1234))); /* { dg-warning "argument 1 range \\\[\[0-9\]+\[lu\]*, \[0-9\]+\[lu\]*\\\] exceeds maximum object size " } */ + sink (f_size_1 (UAR (1, 1234))); /* { dg-warning "argument 1 range \\\[\[0-9\]+, \[0-9\]+\\\] exceeds maximum object size " } */ /* The only valid argument in this range is 1. */ sink (f_size_1 (UAR (2, max / 2))); @@ -181,11 +181,11 @@ test_size_range (size_t n) sink (f_size_2 (1234, n)); sink (f_size_2 (UR (0, 1), 1234)); - sink (f_size_2 (UR (0, 1), 1235)); /* { dg-warning "argument 2 value .1235\[lu\]*. exceeds maximum object size 1234" } */ + sink (f_size_2 (UR (0, 1), 1235)); /* { dg-warning "argument 2 value .1235. exceeds maximum object size 1234" } */ - sink (f_size_2 (UR (1235, 1236), n)); /* { dg-warning "argument 1 range \\\[1235\[lu\]*, 1236\[lu\]*\\\] exceeds maximum object size 1234" } */ + sink (f_size_2 (UR (1235, 1236), n)); /* { dg-warning "argument 1 range \\\[1235, 1236\\\] exceeds maximum object size 1234" } */ - sink (f_size_2 (UR (1235, 1236), UR (max / 2, max))); /* { dg-warning "argument 1 range \\\[\[0-9\]+\[lu\]*, \[0-9\]+\[lu\]*\\\] exceeds maximum object size " } */ -/* { dg-warning "argument 2 range \\\[\[0-9\]+\[lu\]*, \[0-9\]+\[lu\]*\\\] exceeds maximum object size " "argument 2" { target *-*-* } .-1 } */ + sink (f_size_2 (UR (1235, 1236), UR (max / 2, max))); /* { dg-warning "argument 1 range \\\[\[0-9\]+, \[0-9\]+\\\] exceeds maximum object size " } */ +/* { dg-warning "argument 2 range \\\[\[0-9\]+, \[0-9\]+\\\] exceeds maximum object size " "argument 2" { target *-*-* } .-1 } */ }