Re: Fix testsuite/g++.dg/cpp1y/constexpr-66093.C execution failure...

2021-01-04 Thread Alexandre Oliva
On Jan 4, 2021, Mike Stump wrote: > Oh, It's possible the comments were stripped from the bug report or > initial email. Never mind then about the comment part. Thanks, I'm installing the initial patch. Please let me know in case I mistook the above as approval thereof. -- Alexandre Oliva,

Re: Fix testsuite/g++.dg/cpp1y/constexpr-66093.C execution failure...

2021-01-04 Thread Mike Stump via Gcc-patches
On Jan 1, 2021, at 6:41 PM, Alexandre Oliva wrote: > > On Jan 1, 2021, Mike Stump wrote: > >> On Jan 1, 2021, at 3:37 PM, Alexandre Oliva wrote: >>> >>> On Dec 29, 2020, Mike Stump wrote: >>> a[i-1] = i; >>> >>> 'fraid that won't pass: >>> >>> for (int i = 0; i < n; i++) { >>>

Re: Fix testsuite/g++.dg/cpp1y/constexpr-66093.C execution failure...

2021-01-01 Thread Alexandre Oliva
On Jan 1, 2021, Mike Stump wrote: > On Jan 1, 2021, at 3:37 PM, Alexandre Oliva wrote: >> >> On Dec 29, 2020, Mike Stump wrote: >> >>> a[i-1] = i; >> >> 'fraid that won't pass: >> >> for (int i = 0; i < n; i++) { >> assert (a[i] == i); >> } > Ok, how about your version with the comment

Re: Fix testsuite/g++.dg/cpp1y/constexpr-66093.C execution failure...

2021-01-01 Thread Mike Stump via Gcc-patches
On Jan 1, 2021, at 3:37 PM, Alexandre Oliva wrote: > > On Dec 29, 2020, Mike Stump wrote: > >> a[i-1] = i; > > 'fraid that won't pass: > >for (int i = 0; i < n; i++) { >assert (a[i] == i); >} Ok, how about your version with the comment updated?

Re: Fix testsuite/g++.dg/cpp1y/constexpr-66093.C execution failure...

2021-01-01 Thread Alexandre Oliva
On Dec 29, 2020, Mike Stump wrote: > a[i-1] = i; 'fraid that won't pass: for (int i = 0; i < n; i++) { assert (a[i] == i); } we could make it: a[i-1] = i-1; but... yuck. IMHO it's a lot less surprising to have an init loop that matches the check. >> +++

Re: Fix testsuite/g++.dg/cpp1y/constexpr-66093.C execution failure...

2020-12-29 Thread Mike Stump via Gcc-patches
On Dec 22, 2020, at 1:44 PM, Alexandre Oliva wrote: > > The constexpr iteration dereferenced an array element past the end of > the array. > > Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. > Ok to install? How about: a[i-1] = i; instead? This I think better

Fix testsuite/g++.dg/cpp1y/constexpr-66093.C execution failure...

2020-12-22 Thread Alexandre Oliva
The constexpr iteration dereferenced an array element past the end of the array. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Jerome Lambourg for gcc/testsuite/ChangeLog * g++.dg/cpp1y/constexpr-66093.C: Fix bounds issue. ---