PR c++/89217 - ICE with list-initialization in range-based for loop.
authorMarek Polacek <polacek@redhat.com>
Sun, 17 Feb 2019 16:52:40 +0000 (16:52 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Sun, 17 Feb 2019 16:52:40 +0000 (16:52 +0000)
commit1f6857ba5608f715621cfe8d3c3be31b3040e9e6
tree9dee916ca3c34d2ac5f7cf385af30f3daf880f59
parentb43e6340c80f3ae0ddf70950a8f979f4791c3252
PR c++/89217 - ICE with list-initialization in range-based for loop.

* constexpr.c (unshare_constructor): No longer static.
* cp-tree.h (unshare_constructor): Declare.
* semantics.c (finish_compound_literal): When dealing with a
non-dependent expression in a template, return the original
expression.  Pass LOOKUP_NO_NARROWING to digest_init_flags.

* g++.dg/cpp0x/range-for37.C: New test.

From-SVN: r268969
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-tree.h
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/range-for37.C [new file with mode: 0644]