From patchwork Thu Sep 7 14:09:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 75460 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 455D7385828E for ; Thu, 7 Sep 2023 14:09:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 455D7385828E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694095759; bh=SIIR+vXP8GJb2gC13PFXBISFWVnP5EAiqN5HSkLyKDs=; h=To:Cc:Subject:References:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Help:List-Subscribe:From: Reply-To:From; b=Fo39tkWkgyOfGKX796rgZ+TOPlIq9s2IGlL8BogjmPKm7uhx1bU0iGCCv3LLAaAKC v5frjXV485BypccB7cY7mlkzSflNRkQ6WP+Q39/cVgRKhBK2RraY7CueakYJbiHUF2 rumVs7rFUHZNhAxWACyHnf77QKJ24nabRI2NVEzU= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org 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 D7C9D3858D1E for ; Thu, 7 Sep 2023 14:09:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D7C9D3858D1E Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-19-V0sjblDYOCGcsQD76i9-Hg-1; Thu, 07 Sep 2023 10:09:11 -0400 X-MC-Unique: V0sjblDYOCGcsQD76i9-Hg-1 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-76f0b7e3879so111819385a.0 for ; Thu, 07 Sep 2023 07:09:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694095750; x=1694700550; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SIIR+vXP8GJb2gC13PFXBISFWVnP5EAiqN5HSkLyKDs=; b=ElYZZ9ne9uQjsj3dwVsOMdWjqXCR4Q+K7/6+DzWSAL4ZUIcsLPkzr5Rss0dBhHcInd +yPDlP5Bv17legApNV5PlbZsbzDnv0/D9eK0VfdaC0x+FbgWAz7Hkrq7jOv/mACaeezZ M1dTu6Xw/spnCT6xaZDvxS2zfBaLlLaqlrJzozmwUGiyBqvbxDhcAUyQqz39v8+2Fai0 X36zoeBZio1zOhCQdBGL65z9nu/OTGtKindyhhV/cV9r+KK0IEeUBtwoNuoA51ioalLe jqhwXx+ne5XZZaik5daA5D+aBjOxX/9qZ9Y2Yq0B1/VMpbLNrk/5yIKmunFXD2jPH4yB x7ew== X-Gm-Message-State: AOJu0YyQQkVtnPrntZTXvF4LnMSYsqvS3y3D5YsCrIYHaqN+B2oRAIdm BDxQ+rIciZ2NuPEhETtyftB06ChU3+4EuzB4PEZ0YTVgjs53iNOOtpcOZ75Is6JPwF455b7Mg9I SDYgEox7K4A4Rx2n4jI7kbk1/mynD X-Received: by 2002:a05:620a:468b:b0:762:4e2:847b with SMTP id bq11-20020a05620a468b00b0076204e2847bmr22804961qkb.54.1694095750199; Thu, 07 Sep 2023 07:09:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMDnYR5Ly0lYOeJTlO4MbxG+mW5uat9KqLN4lWhnDFxfVJD4qs5LtcDrjEzsCyDrGboFN7sA== X-Received: by 2002:a05:620a:468b:b0:762:4e2:847b with SMTP id bq11-20020a05620a468b00b0076204e2847bmr22804941qkb.54.1694095749967; Thu, 07 Sep 2023 07:09:09 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id m15-20020ae9e00f000000b0076f124abe4dsm5802637qkk.77.2023.09.07.07.09.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 07:09:09 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id CC0A5B4FD2; Thu, 7 Sep 2023 16:09:07 +0200 (CEST) To: Dodji Seketeli Cc: libabigail@sourceware.org Subject: [PATCH 15/16] ir: Fix qualification as non-confirmed propagated canonical types Organization: Red Hat / France References: <87il8mglc1.fsf@redhat.com> X-Operating-System: CentOS Stream release 9 X-URL: http://www.redhat.com Date: Thu, 07 Sep 2023 16:09:07 +0200 In-Reply-To: <87il8mglc1.fsf@redhat.com> (Dodji Seketeli's message of "Thu, 07 Sep 2023 15:32:46 +0200") Message-ID: <87o7iedqik.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Dodji Seketeli via Libabigail From: Dodji Seketeli Reply-To: Dodji Seketeli Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" Hello, While looking at something else, there are some types considered having "non-confirmed propagated canonical type", even though those types are not even canonical-type-propagated. This patch fixes that. That doesn't have any visible impact, but it's definitely more correct. * src/abg-ir.cc (return_comparison_result): A type that doesn't have propagated canonical type can't be considered having "non-confirmed propagated canonical type". Signed-off-by: Dodji Seketeli Applied to master. --- src/abg-ir.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index f318a027..e7a2d6a8 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -1041,7 +1041,10 @@ return_comparison_result(T& l, T& r, bool value, // eventually fails. env.priv_->add_to_types_with_non_confirmed_propagated_ct(is_type(&r)); } - else if (value == true && env.priv_->right_type_comp_operands_.empty()) + else if (value == true + && env.priv_->right_type_comp_operands_.empty() + && is_type(&r)->priv_->canonical_type_propagated() + && !is_type(&r)->priv_->propagated_canonical_type_confirmed()) { // The type provided in the 'r' argument is the type that is // being canonicalized; 'r' is not a mere subtype being @@ -1052,7 +1055,9 @@ return_comparison_result(T& l, T& r, bool value, // "canonical type propagation" optimization. env.priv_->confirm_ct_propagation(&r); } - else if (value == true) + else if (value == true + && is_type(&r)->priv_->canonical_type_propagated() + && !is_type(&r)->priv_->propagated_canonical_type_confirmed()) // In any other case, we are not sure if propagated types // should be confirmed yet. So let's mark them as such. env.priv_->add_to_types_with_non_confirmed_propagated_ct(is_type(&r));