On Thu, May 28, 2020 at 6:57 AM Marek Polacek <pola...@redhat.com> wrote: > > On Thu, May 28, 2020 at 06:44:53AM -0700, H.J. Lu via Gcc-patches wrote: > > On Wed, May 27, 2020 at 12:07 PM Jason Merrill via Gcc-patches > > <gcc-patches@gcc.gnu.org> wrote: > > > > > > Here, when considering the two 'insert' overloads, we look for aggregate > > > conversions from the same initializer-list to B<3> or > > > initializer_list<B<3>>. But since my fix for reshape_init overhead on the > > > PR14179 testcase we reshaped the initializer-list directly, leading to an > > > error when we then tried to reshape it differently for the second > > > overload. > > > > > > Tested x86_64-pc-linux-gnu, applying to trunk and 10. > > > > > > gcc/cp/ChangeLog: > > > > > > PR c++/95319 > > > * decl.c (reshape_init_array_1): Don't reuse in overload context. > > > > > > gcc/testsuite/ChangeLog: > > > > > > PR c++/95319 > > > * g++.dg/cpp0x/initlist-array12.C: New test. > > > > I got > > > > FAIL: g++.dg/cpp0x/initlist-array12.C -std=c++14 (test for excess errors) > > FAIL: g++.dg/cpp0x/initlist-array12.C -std=c++17 (test for excess errors) > > FAIL: g++.dg/cpp0x/initlist-array12.C -std=c++2a (test for excess errors) > > This can be fixed with the attached patch. Jason, is it OK? > > > FAIL: g++.dg/ext/tmplattr10.C -std=c++98 (test for excess errors) > > But I don't know why this one fails.
[hjl@gnu-cfl-2 gcc]$ /export/build/gnu/tools-build/gcc-debug/build-x86_64-linux/gcc/testsuite/g++/../../xg++ -B/export/build/gnu/tools-build/gcc-debug/build-x86_64-linux/gcc/testsuite/g++/../../ /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C -m32 -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -fdiagnostics-urls=never -nostdinc++ -I/export/build/gnu/tools-build/gcc-debug/build-x86_64-linux/x86_64-pc-linux-gnu/32/libstdc++-v3/include/x86_64-pc-linux-gnu -I/export/build/gnu/tools-build/gcc-debug/build-x86_64-linux/x86_64-pc-linux-gnu/32/libstdc++-v3/include -I/export/gnu/import/git/sources/gcc/libstdc++-v3/libsupc++ -I/export/gnu/import/git/sources/gcc/libstdc++-v3/include/backward -I/export/gnu/import/git/sources/gcc/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++98 -pedantic-errors -Wno-long-long -S -o tmplattr10.s /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C:15:31: error: variadic templates only available with ‘-std=c++11’ or ‘-std=gnu++11’ /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C:16:28: error: variadic templates only available with ‘-std=c++11’ or ‘-std=gnu++11’ /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C:18:11: error: expected nested-name-specifier before ‘type’ /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C:21:31: error: variadic templates only available with ‘-std=c++11’ or ‘-std=gnu++11’ /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C:22:39: error: variadic templates only available with ‘-std=c++11’ or ‘-std=gnu++11’ /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C:24:11: error: expected nested-name-specifier before ‘type’ /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C:27:31: error: variadic templates only available with ‘-std=c++11’ or ‘-std=gnu++11’ /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C:28:38: error: variadic templates only available with ‘-std=c++11’ or ‘-std=gnu++11’ /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C:30:11: error: expected nested-name-specifier before ‘type’ /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C:34:6: error: ISO C++ forbids declaration of ‘wrap’ with no type [-fpermissive] /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C:34:1: error: top-level declaration of ‘wrap’ specifies ‘auto’ /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C:34:51: error: trailing return type only available with ‘-std=c++11’ or ‘-std=gnu++11’ /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C: In function ‘int main()’: /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/ext/tmplattr10.C:51:12: error: ‘wrap’ was not declared in this scope [hjl@gnu-cfl-2 gcc]$ -- H.J.