aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Yong <10walls@gmail.com>2023-02-27 10:20:52 +0000
committerJonathan Yong <10walls@gmail.com>2023-03-31 04:08:25 +0000
commit65dd42d2c3dac76afc26228750821dd05e75fca8 (patch)
tree6d62184be55220f5d13dfeef5eb149f91c832bb9 /gcc
parentfe42e7fe119159f7443dbe68189e52891dc0148e (diff)
downloadgcc-65dd42d2c3dac76afc26228750821dd05e75fca8.zip
gcc-65dd42d2c3dac76afc26228750821dd05e75fca8.tar.gz
gcc-65dd42d2c3dac76afc26228750821dd05e75fca8.tar.bz2
c-c++-common/Warray-bounds.c: Fix excess warnings on LLP64
Excess errors on x86_64-w64-mingw32: /home/user/p/gcc/src/gcc-git/gcc/testsuite/c-c++-common/Warray-bounds.c:50:3: warning: array subscript 4611686018427387902 is above array bounds of 'struct S16[]' [-Warray-bounds=] /home/user/p/gcc/src/gcc-git/gcc/testsuite/c-c++-common/Warray-bounds.c:55:3: warning: array subscript 4611686018427387902 is above array bounds of 'struct S16[]' [-Warray-bounds=] /home/user/p/gcc/src/gcc-git/gcc/testsuite/c-c++-common/Warray-bounds.c:90:3: warning: array subscript 658812288346769699 is above array bounds of 'struct S16[][7]' [-Warray-bounds=] gcc/testsuite/ChangeLog: * c-c++-common/Warray-bounds.c: Fix excess warnings on LLP64. Signed-off-by: Jonathan Yong <10walls@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/c-c++-common/Warray-bounds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/testsuite/c-c++-common/Warray-bounds.c b/gcc/testsuite/c-c++-common/Warray-bounds.c
index 815badc..ce5827d 100644
--- a/gcc/testsuite/c-c++-common/Warray-bounds.c
+++ b/gcc/testsuite/c-c++-common/Warray-bounds.c
@@ -47,12 +47,12 @@ void farr_s16 (void)
T (ax[-1]); /* { dg-warning "array subscript -1 is below array bounds" } */
T (ax[0]);
- T (ax[DIFF_MAX / 2 - 1]);
+ T (ax[DIFF_MAX / 2 - 1]); /* { dg-warning "array subscript \[0-9\]+ is above array bounds" "llp64" { target llp64 } } */
T (ax[DIFF_MAX / 2]); /* { dg-warning "array subscript \[0-9\]+ is above array bounds" } */
T (ax[DIFF_MAX / 2 + (size_t)1]); /* { dg-warning "array subscript \[0-9\]+ is above array bounds" } */
T (ax[SIZE_MAX]); /* { dg-warning "array subscript \[0-9\]+ is above array bounds" } */
T (ax[R (DIFF_MIN, -1)]); /* { dg-warning "array subscript -1 is below array bounds" } */
- T (ax[R (DIFF_MAX / 2 - 1, DIFF_MAX)]);
+ T (ax[R (DIFF_MAX / 2 - 1, DIFF_MAX)]); /* { dg-warning "array subscript \[0-9\]+ is above array bounds" "llp64" { target llp64 } } */
T (ax[R (DIFF_MAX / 2, DIFF_MAX)]); /* { dg-warning "array subscript \[0-9\]+ is above array bounds" } */
}
@@ -87,7 +87,7 @@ void farr_s16_7 (void)
T (ax_7[R (-1, DIFF_MAX)][0]);
T (ax_7[R ( 1, DIFF_MAX)][0]);
- T (ax_7[R (DIFF_MAX / 14 - 1, DIFF_MAX)][0]);
+ T (ax_7[R (DIFF_MAX / 14 - 1, DIFF_MAX)][0]); /* { dg-warning "array subscript \[0-9\]+ is above array bounds" "llp64" { target llp64 } } */
i = R (DIFF_MAX / 14, DIFF_MAX);
T (ax_7[i][0]); /* { dg-warning "array subscript \[0-9\]+ is above array bounds" } */
@@ -199,7 +199,7 @@ void fb (struct B *p)
void f_cststring (int i)
{
- T (""[DIFF_MIN]); /* { dg-warning "array subscript -\[0-9\]+ is below array bounds of .(const )?char *\\\[1]" "string" { xfail lp64 } } */
+ T (""[DIFF_MIN]); /* { dg-warning "array subscript -\[0-9\]+ is below array bounds of .(const )?char *\\\[1]" "string" { xfail { lp64 || llp64 } } } */
T (""[DIFF_MIN + 1]); /* { dg-warning "array subscript -\[0-9\]+ is below array bounds of .(const )?char *\\\[1]" "string" } */
T (""[-1]); /* { dg-warning "array subscript -1 is below array bounds of .(const )?char *\\\[1]" "string" } */
T (""[0]);