https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89217

--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Sun Feb 17 16:52:40 2019
New Revision: 268969

URL: https://gcc.gnu.org/viewcvs?rev=268969&root=gcc&view=rev
Log:
        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.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/range-for37.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to