From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 0BB75385702F for ; Fri, 25 Sep 2020 20:30:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0BB75385702F Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-592-WZyAtIDLOIaWGBNeVQLapw-1; Fri, 25 Sep 2020 16:30:29 -0400 X-MC-Unique: WZyAtIDLOIaWGBNeVQLapw-1 Received: by mail-qv1-f69.google.com with SMTP id 99so2581127qva.1 for ; Fri, 25 Sep 2020 13:30:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1nzHSWKC0vsPcMSWcIeIr+5NTfRSr4xF28HGHEJSaro=; b=j4U1piaipuvNzNhkzlcxeS8oTx5zlo6jnpCffgQRo/vkpbH7n8lmLSNbS/aWkQyn0c wIgBTdKe1hbGd4AC7tvgF5fPxgYEZto51OUPRftiAQSje4IQTiLrhfHVdOFGEmsd0kKI bDAVhgiPz9B0LVC24sk0DRIFO/m5VUbFNUjYv6lIl3rxSx27V8bOdlGR1N5XHq0egE61 kGN63rwb0g2bq6ym9wGdvtVDCRMVBBuWZXNRtxzXPbeDWwhC8c+xvlRohdcFIZt6g7LJ h1xEvlCAtflIM8ySGppg095O7FVhzyYJJltU4jW4GZyn0fYHOF6xRGWHFpDptU4OMAPl Uh1Q== X-Gm-Message-State: AOAM530jKjac0fzNBKIXnooaRxEG+vJtFmYS63ZQYVzST7HyuNqj30bw ARF8hIcwnCnxAr77QIxzsAdVoywP1XJPCBaU742avvV0cO8mSuUPartDA6O8SauCd9aGYjZHvU9 /KdVxVYL309drC7tqGA== X-Received: by 2002:a37:67d2:: with SMTP id b201mr1888715qkc.96.1601065828495; Fri, 25 Sep 2020 13:30:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3gA1xuu96Z81dDbauD+m1vAYhgTReIeeijOrB3Y+XBjU8Z1IKf7WmWXrlPw47xn3gHmiNxA== X-Received: by 2002:a37:67d2:: with SMTP id b201mr1888696qkc.96.1601065828242; Fri, 25 Sep 2020 13:30:28 -0700 (PDT) Received: from [192.168.1.148] (209-6-216-142.s141.c3-0.smr-cbr1.sbo-smr.ma.cable.rcncustomer.com. [209.6.216.142]) by smtp.gmail.com with ESMTPSA id o13sm2666343qtq.41.2020.09.25.13.30.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Sep 2020 13:30:27 -0700 (PDT) Subject: Re: [PATCH] c++: Fix up default initialization with consteval default ctor [PR96994] To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org References: <20200915075706.GN21814@tucnak> From: Jason Merrill Message-ID: <85caa26e-876e-179a-763a-ea934b28618a@redhat.com> Date: Fri, 25 Sep 2020 16:30:26 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200915075706.GN21814@tucnak> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 20:30:32 -0000 On 9/15/20 3:57 AM, Jakub Jelinek wrote: > Hi! > > The following testcase is miscompiled (in particular the a and i > initialization). The problem is that build_special_member_call due to > the immediate constructors (but not evaluated in constant expression mode) > doesn't create a CALL_EXPR, but returns a TARGET_EXPR with CONSTRUCTOR > as the initializer for it, That seems like the bug; at the end of build_over_call, after you > call = cxx_constant_value (call, obj_arg); You need to build an INIT_EXPR if obj_arg isn't a dummy. Jason