PR c++/89083, c++/80864 - ICE with list initialization in template.
authorMarek Polacek <polacek@redhat.com>
Thu, 31 Jan 2019 20:21:11 +0000 (20:21 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 31 Jan 2019 20:21:11 +0000 (20:21 +0000)
commitb27f74e77740a0982621af083a5743383a4de9d3
tree61a150f1a13f1a04a1e07e7f0a4d5b6806b740c8
parent1d4b4f4979171ef0dacc452439e3a317795441db
PR c++/89083, c++/80864 - ICE with list initialization in template.

* constexpr.c (adjust_temp_type): Use copy_node and change the type
instead of using build_constructor.
* decl.c (reshape_init_r): Don't reshape a digested initializer.
Return the initializer for COMPOUND_LITERAL_P.

* g++.dg/cpp0x/initlist107.C: New test.
* g++.dg/cpp0x/initlist108.C: New test.
* g++.dg/cpp0x/initlist109.C: New test.
* g++.dg/cpp0x/initlist110.C: New test.
* g++.dg/cpp0x/initlist111.C: New test.
* g++.dg/cpp0x/initlist112.C: New test.
* g++.dg/init/ptrfn4.C: New test.

From-SVN: r268428
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/initlist107.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/initlist108.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/initlist109.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/initlist110.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/initlist111.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/initlist112.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/ptrfn4.C [new file with mode: 0644]