From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by sourceware.org (Postfix) with ESMTPS id 8D89D386F81C for ; Thu, 27 Aug 2020 18:05:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8D89D386F81C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wr1-f66.google.com with SMTP id x7so6251303wro.3 for ; Thu, 27 Aug 2020 11:05:03 -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:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=u4RF4lci21ZU+aJJ+Pm8aJO8uqfxxMacDZW7JS4A66U=; b=XwiDKIlaqsklT2SPTDtcUgIvTIeAkD910YvGt/BJbWIF2+Qm3KZdd5rc5jcBJpFxo9 TWa533lDyKn7qbGrdt/WqXz9gJwCFJBRkfWbzZRZQB0yLxqAV4ycZQJu3cWluSDmxcQJ ygCTGI6NCgtJhH1sd0XL7bkHYBHMQIaKpAaVKAwmcKV2pEvqsVuyt0QJxlPsZ//xmvpH AIyZKlpakujMnyDWIHLWu1n/lqO+tgJinxc9ssHIe0yVlCq+ot3wqzdLZzZYgbXZhEGJ THFSaU05zglV8Eh6oyuE6mJugNqSmNGTf7RpE1qiShl0cqiCgfr7RCQ4aORmpNXeaxrk eSKw== X-Gm-Message-State: AOAM531DPUejvCEo6dN1+22KEi1dpM7uVoxQAmXtnxANiP1Kv+QXlf6f CkeAw79BNuMvKsTxnrkN6f3PiAHI3CVhWA== X-Google-Smtp-Source: ABdhPJxrl7NC6ZafK6EoBZ0tK2EX9aL1XGU6GdB+m60J9q0euPXG1BuGk89NH1I5cWpskxPVwFurmw== X-Received: by 2002:a5d:6987:: with SMTP id g7mr3076798wru.173.1598551501689; Thu, 27 Aug 2020 11:05:01 -0700 (PDT) Received: from ?IPv6:2001:8a0:f905:5600:56ee:75ff:fe8d:232b? ([2001:8a0:f905:5600:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id z8sm6191148wmf.42.2020.08.27.11.05.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Aug 2020 11:05:00 -0700 (PDT) Subject: Re: [PATCH v2] Enable gdb.cp/ambiguous.exp with GCC and clang To: Gary Benson References: <1597670664-14171-1-git-send-email-gbenson@redhat.com> <4b7a4f2e-9e77-495a-759b-187aebb342aa@palves.net> <20200825142146.GA14101@blade.nx> <20200827103901.GA9478@blade.nx> <20200827150741.GA18029@blade.nx> <681377e5-17f6-7bf3-1dde-3b6d85bed70f@palves.net> <20200827161850.GA22365@blade.nx> Cc: Luis Machado , gdb-patches@sourceware.org From: Pedro Alves Message-ID: <413512b9-dd0d-145c-52ca-5befae84b203@palves.net> Date: Thu, 27 Aug 2020 19:04:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20200827161850.GA22365@blade.nx> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 18:05:05 -0000 On 8/27/20 5:18 PM, Gary Benson wrote: > Pedro Alves wrote: >> On 8/27/20 4:07 PM, Gary Benson wrote: >>> Pedro Alves wrote: >>>> On 8/27/20 11:39 AM, Gary Benson wrote: >>>>> Luis Machado wrote: >>>>>> I get the following, under Ubuntu 18.04 (GCC 7.x) with this commit... >>>>>> >>>>>> FAIL: gdb.cp/ambiguous.exp: print x.x >>>>>> FAIL: gdb.cp/ambiguous.exp: print n.x >>>>>> FAIL: gdb.cp/ambiguous.exp: print j.x >>>>>> FAIL: gdb.cp/ambiguous.exp: print jva1.x >>>>>> FAIL: gdb.cp/ambiguous.exp: print jva2.x >>>>>> FAIL: gdb.cp/ambiguous.exp: print (A1)j >>>>>> FAIL: gdb.cp/ambiguous.exp: print (A1)jva1 >>>>>> >>>>>> Is the test really supposed to run with older GCC's? >>>>> >>>>> Maybe not. Though, I don't know what version of GCC it ought to >>>>> start working on, so it's hard to know what to do. I could leave >>>>> the "-w" in for GCC < 10, and add an extra check to make it bail >>>>> out for GCC <= your version, Luis? With a suitable comment to >>>>> mention that that's not set in stone? >>>> >>>> I'm seeing it fail with GCC 9 and clang 10 as well. >>>> >>>> Actually, the testcase can't be working _anywhere_. It's testing a >>>> feature that is gone from GDB. >>> [snip] >>>> ...search_struct_field does not handle the ambiguous field >>>> case nowadays. Somehow it got lost over the years. >>>> That seems like a regression. I wrote up a patch that adds >>>> it back (though different), but it exposed other latent >>>> bugs... Sigh. I'll post it soon. >>> >>> So the test would start passing if that patch was added? >>> Should we leave the test alone, or XFAIL the cases that >>> fail, or...? >> >> I'm adjusting / fixing the testcase at the same time as I'm >> patching GDB. So for now, do nothing. > > Awesome, thank you. I've sent it now, here: [PATCH] Reject ambiguous C++ field accesses https://sourceware.org/pipermail/gdb-patches/2020-August/171526.html