This fails for me as: +ERROR: g++.dg/cpp26/constexpr-new3.C -std=c++26: unknown dg option: 2 for " dg-error 40 "accessing value of 'int [2]' object through a 'long int' glvalue in a constant expression" " otherwise.
Escape '[' and ']'. gcc/testsuite/ChangeLog: * g++.dg/cpp26/constexpr-new3.C: Escape '[' and ']'. --- gcc/testsuite/g++.dg/cpp26/constexpr-new3.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/g++.dg/cpp26/constexpr-new3.C b/gcc/testsuite/g++.dg/cpp26/constexpr-new3.C index 74661994eb1b..c79060fc9b6c 100644 --- a/gcc/testsuite/g++.dg/cpp26/constexpr-new3.C +++ b/gcc/testsuite/g++.dg/cpp26/constexpr-new3.C @@ -37,7 +37,7 @@ baz () { std::allocator<int> a; auto b = a.allocate (2); - new (b) long (42); // { dg-error "accessing value of 'int [2]' object through a 'long int' glvalue in a constant expression" } + new (b) long (42); // { dg-error "accessing value of 'int \\\[2\\\]' object through a 'long int' glvalue in a constant expression" } a.deallocate (b, 2); return true; } base-commit: 612194c064c2ca279191712bcc01f8fcef65ade9 -- 2.50.1