aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-06-19 10:22:29 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-06-19 10:22:29 +0200
commit5460b1030c86c2d328335f141dc2972c7ea9fd1e (patch)
tree2b27cd2cedfc12b021219a8be27a303d8f424747
parent99efe97da48304ded7575ff72db3e9a6903d6c5d (diff)
downloadgcc-5460b1030c86c2d328335f141dc2972c7ea9fd1e.zip
gcc-5460b1030c86c2d328335f141dc2972c7ea9fd1e.tar.gz
gcc-5460b1030c86c2d328335f141dc2972c7ea9fd1e.tar.bz2
* g++.dg/ubsan/pr63956.C: Adjust expected diagnostics.
From-SVN: r272470
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g++.dg/ubsan/pr63956.C8
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8255d9e..72f34d8 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2019-06-19 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/ubsan/pr63956.C: Adjust expected diagnostics.
+
2019-06-19 Jim MacArthur <jim.macarthur@codethink.co.uk>
Mark Eggleston <mark.eggleston@codethink.com>
diff --git a/gcc/testsuite/g++.dg/ubsan/pr63956.C b/gcc/testsuite/g++.dg/ubsan/pr63956.C
index 1aac3ec..3a1596e 100644
--- a/gcc/testsuite/g++.dg/ubsan/pr63956.C
+++ b/gcc/testsuite/g++.dg/ubsan/pr63956.C
@@ -80,13 +80,13 @@ constexpr int
fn5 (const int *a, int b)
{
if (b != 2)
- b = a[b];
+ b = a[b]; // { dg-error "array subscript" }
return b;
}
constexpr int m1[4] = { 1, 2, 3, 4 };
constexpr int m2 = fn5 (m1, 3);
-constexpr int m3 = fn5 (m1, 4); // { dg-error "array subscript|in .constexpr. expansion of " }
+constexpr int m3 = fn5 (m1, 4); // { dg-message "in .constexpr. expansion of " }
constexpr int
fn6 (const int &a, int b)
@@ -112,11 +112,11 @@ constexpr int
fn8 (int i)
{
constexpr int g[10] = { };
- return g[i];
+ return g[i]; // { dg-error "array subscript" }
}
constexpr int o1 = fn8 (9);
-constexpr int o2 = fn8 (10); // { dg-error "array subscript|in .constexpr. expansion of " }
+constexpr int o2 = fn8 (10); // { dg-message "in .constexpr. expansion of " }
constexpr int
fn9 (int a, int b)