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 [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 8B4433858D1E for ; Wed, 30 Nov 2022 18:58:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8B4433858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669834739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LDY74NSpHjSZI8CrM8uBJdngbqtsK4my4zb1qDswXwk=; b=h54NaOhd7EhFR96H+Pg4ggK7h92lbKGX7/mV8uq0q4Q+ry1d8t1GznMuE72JiV1PZ2HaX8 bCpvWyoG+FmRFrgEg2bqFUZHjQQwydfapj0icMiojtYtM/ZG0S5vZSLUArK479q/zxFIgB tE4kyehksEYzaUmx/YNBSZ4Iljy32LQ= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-43-gKyokfEvNOOYOdjs9oPIVg-1; Wed, 30 Nov 2022 13:58:57 -0500 X-MC-Unique: gKyokfEvNOOYOdjs9oPIVg-1 Received: by mail-qk1-f199.google.com with SMTP id bk30-20020a05620a1a1e00b006fb2378c857so41229595qkb.18 for ; Wed, 30 Nov 2022 10:58:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LDY74NSpHjSZI8CrM8uBJdngbqtsK4my4zb1qDswXwk=; b=WyhLVK3DGon3zwJRSwLCnjHh5BZ2mSx83N8NiK15pLaCTNd8dlUUTN+TDQ/qU1LF4X QrN06UqZ8VVCE3ytLCZvpIjD8InZC3qPAFreWK8Ka8El6T5er3tf2CaBzsjnVWzo0IJo UU7yKc6fQZYaKR97zMl5Z++3HnMWuOkGhi+bdJYVF3NoEtWAVLk66eT9y4hUj2o9s7bz QTGaEPsVa1onPYExXjPmkZMHTZm5dVvQFKSzHJlr5fDog2OwCfSmZFnNny/sL5XjwmZB J7y7SikoTwjnK2tsHGayLN9N1IeAbyE44DVSR3K7w0A7KT1QWcAFUNCbwag0A/vgZdGB FLyw== X-Gm-Message-State: ANoB5pmBKoqQSD9WW4+V93tEG6+8LBddqIm/WWzU+n2AAKa9cd1U6qRd t7J9dxnz8mjZWWs4eT5YIUtngQs1FBhjwFFt/iJmfyZswD+sac9peIj/Crcod7HGB6ob8OYpOpB f3nvh7RcKKZea2dAHEA== X-Received: by 2002:ac8:480a:0:b0:3a4:ec00:abef with SMTP id g10-20020ac8480a000000b003a4ec00abefmr58899369qtq.483.1669834737132; Wed, 30 Nov 2022 10:58:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf4SZEqWgmJv/9uIJGIcHtDYv1pPtYbRnkyALiiIyrvMBbcLcxsMw7+WLyHctJrtd4KGiFoEnw== X-Received: by 2002:ac8:480a:0:b0:3a4:ec00:abef with SMTP id g10-20020ac8480a000000b003a4ec00abefmr58899352qtq.483.1669834736821; Wed, 30 Nov 2022 10:58:56 -0800 (PST) Received: from [192.168.1.108] (130-44-159-43.s15913.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.159.43]) by smtp.gmail.com with ESMTPSA id i22-20020a05620a249600b006f9f714cb6asm1843995qkn.50.2022.11.30.10.58.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Nov 2022 10:58:56 -0800 (PST) Message-ID: <5735108a-518d-c69d-0c98-851e1e74f3a2@redhat.com> Date: Wed, 30 Nov 2022 13:58:55 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH] coroutines: Fix promotion of class members in co_await statements [PR99576] To: Iain Sandoe , Adrian Perl Cc: GCC Patches References: From: Jason Merrill In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.5 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_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/30/22 03:51, Iain Sandoe wrote: > Hi Adrian, > >> On 28 Nov 2022, at 20:44, Iain Sandoe wrote: > >>> Bootstrapping and running the testsuite on x86_64 was successfull. No regression occured. >> >> This looks resonable to me, as said in the PR. I’d like to test a little wider with some larger >> codebases, if you could bear with me for a few days. > > So wider testing (in this case folly) reveals that, although the analysis seems reasonable, this is not quite the right patch to fix the issue. It can be that CONSTRUCTORS contain nested await expressions, so we cannot simply punt on seeing one. > > My hunch is that the real solution lies in (correctly) deciding whether to promote the temporary or not. Jason recently made a change that identifies whether a target expression is expected to be elided (i.e. it is a direct intializer for another object) - I think this might help in this case. My concern is whether I should read “expected to be elided” to be a guarantee (“expected” to me could also be read “but it might not be”). You should be able to rely on that flag. I believe all TARGET_EXPRs with TARGET_EXPR_ELIDING_P set are indeed elided. As an optimization, occasionally TARGET_EXPRs without the flag are elided anyway, but it's still safe to promote them; the optimization just won't happen then. Jason