From: Jerome Lambourg Date: Tue, 5 Jan 2021 07:47:41 +0000 (-0300) Subject: Fix testsuite/g++.dg/cpp1y/constexpr-66093.C execution failure... X-Git-Tag: basepoints/gcc-12~1803 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=560d9915762d61bd1027259ecf55339f40a0a1de;p=thirdparty%2Fgcc.git Fix testsuite/g++.dg/cpp1y/constexpr-66093.C execution failure... The constexpr iteration dereferenced an array element past the end of the array. for gcc/testsuite/ChangeLog * g++.dg/cpp1y/constexpr-66093.C: Fix bounds issue. --- diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-66093.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-66093.C index ad3169210d29..3d742cfebd83 100644 --- a/gcc/testsuite/g++.dg/cpp1y/constexpr-66093.C +++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-66093.C @@ -19,7 +19,7 @@ private: constexpr A f() { A a{}; - for (int i = 1; i <= n; i++) { + for (int i = 0; i < n; i++) { a[i] = i; } return a;