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) FAIL: g++.dg/ext/tmplattr10.C -std=c++98 (test for excess errors) on Linux/x86: https://gcc.gnu.org/pipermail/gcc-regression/2020-May/072622.html [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/cpp0x/initlist-array12.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++2a -pedantic-errors -Wno-long-long -S -o initlist-array12.s /export/gnu/import/git/sources/gcc/gcc/testsuite/g++.dg/cpp0x/initlist-array12.C:5:24: fatal error: definition of ‘class std::initializer_list< <template-parameter-1-1> >’ does not match ‘#include <initializer_list>’ compilation terminated. [hjl@gnu-cfl-2 gcc]$ -- H.J.