Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/g++.dg/cpp1y/constexpr-79655.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line diff
--- a/gcc/testsuite/g++.dg/cpp1y/constexpr-79655.C Thu Oct 25 07:37:49 2018 +0900 +++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-79655.C Thu Feb 13 11:34:05 2020 +0900 @@ -5,14 +5,14 @@ foo (int x, int y) { int a[6] = { 1, 2, 3, 4, 5, 6 }; - a[x] = 0; - return a[y]; + a[x] = 0; // { dg-error "is outside the bounds" } + return a[y]; // { dg-error "is outside the bounds" } } -constexpr int b = foo (0, -1); // { dg-error "is outside the bounds|in .constexpr. expansion of " } -constexpr int c = foo (0, 6); // { dg-error "is outside the bounds|in .constexpr. expansion of " } -constexpr int d = foo (6, 0); // { dg-error "is outside the bounds|in .constexpr. expansion of " } -constexpr int e = foo (-1, 0); // { dg-error "is outside the bounds|in .constexpr. expansion of " } +constexpr int b = foo (0, -1); // { dg-message "in .constexpr. expansion of " } +constexpr int c = foo (0, 6); // { dg-message "in .constexpr. expansion of " } +constexpr int d = foo (6, 0); // { dg-message "in .constexpr. expansion of " } +constexpr int e = foo (-1, 0); // { dg-message "in .constexpr. expansion of " } static_assert (foo (5, 5) == 0, ""); static_assert (foo (4, 5) == 6, ""); static_assert (foo (5, 4) == 5, "");