aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wstringop-overflow-15.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/Wstringop-overflow-15.c')
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-15.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-15.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-15.c
index 87f8462..f7dcb94 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-15.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-15.c
@@ -29,8 +29,13 @@ void vla_bounded (int n)
a[0] = 0;
a[1] = 1;
+ a[31] = 31;
+
+ sink (&a);
+
a[n] = n; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" { xfail *-*-* } }
- a[69] = n; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" }
+ a[32] = 32; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" }
+ a[69] = 69; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" }
sink (&a);
}
@@ -56,8 +61,13 @@ void member_vla_bounded (int n)
s.a[0] = 0;
s.a[1] = 1;
+ s.a[31] = 31;
+
+ sink (&s);
+
s.a[n] = n; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" { xfail *-*-* } }
- s.a[69] = n; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" { xfail *-*-* } }
+ s.a[32] = 32; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" }
+ s.a[69] = 69; // { dg-warning "\\\[-Wstringop-overflow" "pr82608" }
sink (&s);
}