From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30901 invoked by alias); 29 Dec 2018 10:28:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 30892 invoked by uid 89); 29 Dec 2018 10:28:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 29 Dec 2018 10:28:27 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 628ED81F01; Sat, 29 Dec 2018 10:28:26 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CAED1600CD; Sat, 29 Dec 2018 10:28:25 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id wBTASNeg009867; Sat, 29 Dec 2018 11:28:23 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id wBTASL00009866; Sat, 29 Dec 2018 11:28:21 +0100 Date: Sat, 29 Dec 2018 13:33:00 -0000 From: Jakub Jelinek To: Alexandre Oliva Cc: Jason Merrill , Christophe Lyon , gcc-patches List Subject: Re: [C++ Patch] [PR c++/88146] do not crash synthesizing inherited ctor(...) Message-ID: <20181229102821.GA30353@tucnak> Reply-To: Jakub Jelinek References: <12883fc9-4e44-e16d-fdc6-9a90c21bf01c@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg01756.txt.bz2 On Sat, Dec 29, 2018 at 12:33:18AM -0200, Alexandre Oliva wrote: > --- a/gcc/cp/typeck2.c > +++ b/gcc/cp/typeck2.c > @@ -918,7 +918,11 @@ check_narrowing (tree type, tree init, tsubst_flags_t complain, bool const_only) > return ok; > } > > - init = maybe_constant_value (init); > + /* Immediate subexpressions in BRACED_ENCLOSED_INITIALIZERs are > + potentially constant evaluated. Without manifestly_const_eval, The term in latest draft is manifestly constant-evaluated. > + we won't instantiate constexpr functions that we must > + instantiate. */ > + init = maybe_constant_value (init, NULL_TREE, /*manifestly_const_eval=*/true); If this is a right change, then it should be covered also by a testcase that makes sure __builtin_is_constant_evaluated () in those initializers evaluates to true in a new g++.dg/cpp2a/is-constant-evaluated-*.C testcase. Jakub