From patchwork Fri Mar 31 21:19:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 67167 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 CC57D3858D33 for ; Fri, 31 Mar 2023 21:19:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC57D3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680297582; bh=8RM3Z6iWv4djbL0O9xYu2dH/SGUA0Hll4XG6WXJ1uzQ=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=aFpA36LvqWulF88pyOs1ugCXL1EGwtn5nW/0umfsSjGmckUjeM25BcfvefBxEm5HW yQCwsVV30JW7yv6BK6d0X3h0vZmfFQXUf4MP1xTy1yynwcLT8aKZu7RWVnRXWVnSGc zaLfinAqzFW5kP4ynKiOOJpiLNAi232/alZhrZwc= 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 D84883858D28 for ; Fri, 31 Mar 2023 21:19:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D84883858D28 Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-179--SruaOIYOqCrTzdWZGTzxw-1; Fri, 31 Mar 2023 17:19:32 -0400 X-MC-Unique: -SruaOIYOqCrTzdWZGTzxw-1 Received: by mail-qv1-f71.google.com with SMTP id dg8-20020a056214084800b005acc280bf19so10337143qvb.22 for ; Fri, 31 Mar 2023 14:19:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680297572; h=mime-version:user-agent:message-id:date:organization:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8RM3Z6iWv4djbL0O9xYu2dH/SGUA0Hll4XG6WXJ1uzQ=; b=LB6b2yr5kvX//I0lwtmETDJoURBNur8ZcZl607eFjdWzcBFvVGowY6T33Qah2b+nlo 4wVHzL5+W1OSvoJAPnYtgHh4mOF+yp4u6GH15A2uq1lvn9TWFUYiC5pqSJL4nca1fGJM BUO0NoM4gAhpJgEmseig2pmGEXkGauPr5GWQD4mCTJYF4Y+Cbu1FuPLgy90yS5YYkvNC V75cR+djdbyT1xE4XbGIhMNky68g9YM4CEapuMXtZ/5qyM++VNPRh9jcqR+FV/QQafT7 LdSmsXoED2ULXqk2s6JgVmGOyxyG7sBIkjHU6jPvG545k18fvcQBRHVGZIThg9nEB46x eqRA== X-Gm-Message-State: AAQBX9d01qEeb/V6XzxZQD09DgfkL7EWoZBycnFJekKkmq27E5gypkur UQ7FBeUE5w8nfaTP98sLsnkzOhVyxbBlABiybHwNZxS2jAB8bInv5Yp7fEC0uNRLhQvG3u8oeN3 glTBDmXb1ISw1ZtP0KNtEqlcR+3/sTjd1zPmJ6bMwy2esVPSJF5t1BhfWWuR8C87tMo242eQO15 iH X-Received: by 2002:a05:6214:1d09:b0:56e:9298:7a1a with SMTP id e9-20020a0562141d0900b0056e92987a1amr19054409qvd.9.1680297571857; Fri, 31 Mar 2023 14:19:31 -0700 (PDT) X-Google-Smtp-Source: AKy350ZgxB4+cd7X5eW6+IvGMNEWh7uXbRqYy6DkrbKRgcQwoyGSwQ0G8ZdO1UDpaqW541tlPi5KYQ== X-Received: by 2002:a05:6214:1d09:b0:56e:9298:7a1a with SMTP id e9-20020a0562141d0900b0056e92987a1amr19054344qvd.9.1680297571045; Fri, 31 Mar 2023 14:19:31 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id n79-20020a374052000000b0074a0508e77esm928983qka.122.2023.03.31.14.19.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 14:19:30 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 467A7581C79; Fri, 31 Mar 2023 23:19:27 +0200 (CEST) To: libabigail@sourceware.org Subject: [PATCH, applied] Fix redundancy filtering of range types Organization: Red Hat / France X-Operating-System: Fedora 38 X-URL: http://www.redhat.com Date: Fri, 31 Mar 2023 23:19:27 +0200 Message-ID: <87y1ncliu8.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 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_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 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 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, After the support for Ada range types was added, it appeared that redundancy propagation was not being correctly handled for range types, especially when those are sub-types of a function parameter type, like a const range. This patch goes through the various problematic spots and addresses the issues. * src/abg-comparison.cc (redundancy_marking_visitor::visit_end): Propagate redundancy category to function parameter diff nodes if they don't carry any local non-type change. * src/abg-default-reporter.cc (default_reporter::report_underlying_changes_of_qualified_type): Define new member function. (default_reporter::report): In the qualified_type_diff overload, use the new report_underlying_changes_of_qualified_type above. * src/abg-ir.cc (types_have_similar_structure): If two arrays are accessed indirectly and if they have size and dimension changes, then the two arrays are considered having a similar structure. Otherwise, if they are accessed directly, having size or dimension change make them considered as having non similar structure. This has an impact on if a change between two array types is considered local or not. * src/abg-leaf-reporter.cc (leaf_reporter::report): Local changes to underlying types of a qualified type are considered local to the qualified type. This change reflects that in the overload for qualified type diff nodes. Otherwise, we won't report what would otherwise be a leaf change to the a qualified type, just because it's actually a leaf change to the underlying type of the qualified type. * tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-{1,2}.txt: New reference output files. * tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.ad{b,s}: Source code for the new binary input below. * tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.o: New binary input file. * tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.ad{b,s}: Source code for the new binary input below. * tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.o: New binary input file. * tests/data/Makefile.am: Add the new test input files above to source distribution. * tests/test-abidiff-exit.cc (in_out_specs): Add the new input tests above to this test harness. * tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt: Adjust. Signed-off-by: Dodji Seketeli --- src/abg-comparison.cc | 7 +++ src/abg-default-reporter.cc | 45 +++++++++++++----- src/abg-ir.cc | 15 ++++-- src/abg-leaf-reporter.cc | 6 +++ tests/data/Makefile.am | 8 ++++ .../test2-ada-subrange-redundant-report-1.txt | 17 +++++++ .../test2-ada-subrange-redundant-report-2.txt | 24 ++++++++++ .../test2-ada-subrange-redundant/v0/test.adb | 17 +++++++ .../test2-ada-subrange-redundant/v0/test.ads | 11 +++++ .../test2-ada-subrange-redundant/v0/test.o | Bin 0 -> 4104 bytes .../test2-ada-subrange-redundant/v1/test.adb | 17 +++++++ .../test2-ada-subrange-redundant/v1/test.ads | 11 +++++ .../test2-ada-subrange-redundant/v1/test.o | Bin 0 -> 3896 bytes .../libtest45-basic-type-change-report-1.txt | 3 ++ tests/test-abidiff-exit.cc | 22 +++++++++ 15 files changed, 186 insertions(+), 17 deletions(-) create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.adb create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.ads create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.o create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.adb create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.ads create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.o new file mode 100644 index 00000000..98b0315f index 3bea50c9..d8d2cfff 100644 diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc index c4596c8e..59530a8a 100644 --- a/src/abg-comparison.cc +++ b/src/abg-comparison.cc @@ -12749,6 +12749,13 @@ struct redundancy_marking_visitor : public diff_node_visitor || (is_var_diff(d) && (!(d->has_local_changes() & LOCAL_NON_TYPE_CHANGE_KIND))) + // A function parameter with non-type local changes + // should not see redundancy propagation either. But + // a function parameter with local type changes can + // definitely be redundant. + || (is_fn_parm_diff(d) + && (!(d->has_local_changes() + & LOCAL_NON_TYPE_CHANGE_KIND))) )) { bool has_non_redundant_child = false; diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc index 31832c3f..b1df9300 100644 --- a/src/abg-default-reporter.cc +++ b/src/abg-default-reporter.cc @@ -348,6 +348,38 @@ default_reporter::report_local_qualified_type_changes(const qualified_type_diff& return false; } +/// For a @ref qualified_type_diff node, report the changes of its +/// underlying type. +/// +/// @param d the @ref qualified_type_diff node to consider. +/// +/// @param out the output stream to emit the report to. +/// +/// @param indent the white string to use for indentation. +/// +/// @return true iff a local change has been emitted. In this case, +/// the local change is a name change. +void +default_reporter::report_underlying_changes_of_qualified_type +(const qualified_type_diff& d, ostream& out, const string& indent) const +{ + if (!d.to_be_reported()) + return; + + diff_sptr dif = d.leaf_underlying_type_diff(); + ABG_ASSERT(dif); + ABG_ASSERT(dif->to_be_reported()); + RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER2(dif, + "unqualified " + "underlying type"); + + string fltname = dif->first_subject()->get_pretty_representation(); + out << indent << "in unqualified underlying type '" << fltname << "'"; + report_loc_info(dif->second_subject(), *d.context(), out); + out << ":\n"; + dif->report(out, indent + " "); +} + /// Report a @ref qualified_type_diff in a serialized form. /// /// @param d the @ref qualified_type_diff node to consider. @@ -372,18 +404,7 @@ default_reporter::report(const qualified_type_diff& d, ostream& out, // It makes a little sense to detail the changes in extenso here. return; - diff_sptr dif = d.leaf_underlying_type_diff(); - ABG_ASSERT(dif); - ABG_ASSERT(dif->to_be_reported()); - RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER2(dif, - "unqualified " - "underlying type"); - - string fltname = dif->first_subject()->get_pretty_representation(); - out << indent << "in unqualified underlying type '" << fltname << "'"; - report_loc_info(dif->second_subject(), *d.context(), out); - out << ":\n"; - dif->report(out, indent + " "); + report_underlying_changes_of_qualified_type(d, out, indent); } /// Report the @ref pointer_diff in a serialized form. diff --git a/src/abg-ir.cc b/src/abg-ir.cc index e0d4f327..ce553653 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -26579,11 +26579,16 @@ types_have_similar_structure(const type_base* first, { const array_type_def* ty2 = is_array_type(second); // TODO: Handle int[5][2] vs int[2][5] better. - if (ty1->get_size_in_bits() != ty2->get_size_in_bits() - || ty1->get_dimension_count() != ty2->get_dimension_count() - || !types_have_similar_structure(ty1->get_element_type(), - ty2->get_element_type(), - /*indirect_type=*/true)) + if (!indirect_type) + { + if (ty1->get_size_in_bits() != ty2->get_size_in_bits() + || ty1->get_dimension_count() != ty2->get_dimension_count()) + return false; + } + + if (!types_have_similar_structure(ty1->get_element_type(), + ty2->get_element_type(), + /*indirect_type=*/true)) return false; return true; diff --git a/src/abg-leaf-reporter.cc b/src/abg-leaf-reporter.cc index 2006d4ff..10d65054 100644 --- a/src/abg-leaf-reporter.cc +++ b/src/abg-leaf-reporter.cc @@ -210,6 +210,12 @@ leaf_reporter::report(const qualified_type_diff& d, ostream& out, return; report_local_qualified_type_changes(d, out, indent); + + // Note that changes that are local to the underlying type of a + // qualified type are considered to be local to the qualified type + // itself. So let's go ahead and report the local changes of the + // underlying type. + report_underlying_changes_of_qualified_type(d, out, indent); } /// Report the changes carried by a @ref pointer_diff node. diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index c91c24fb..6aab630b 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -306,6 +306,14 @@ test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.o \ test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.adb \ test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.ads \ test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.o \ +test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt \ +test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt \ +test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.adb \ +test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.ads \ +test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.o \ +test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.adb \ +test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.ads \ +test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.o \ \ test-diff-dwarf/test0-v0.cc \ test-diff-dwarf/test0-v0.o \ diff --git a/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt b/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt new file mode 100644 index 00000000..742dda83 --- /dev/null +++ b/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt @@ -0,0 +1,17 @@ +Functions changes summary: 0 Removed, 2 Changed, 0 Added functions +Variables changes summary: 0 Removed, 0 Changed, 0 Added variable + +2 functions with some indirect sub-type change: + + [C] 'function test__my_int[101] test__first_function(test__my_int[101]&)' at test.adb:6:1 has some indirect sub-type changes: + return type changed: + type name changed from 'test__my_int[101]' to 'test__my_int[201]' + array type size changed from 101000 to 201000 + array type subrange 1 changed length from 101 to 201 + + [C] 'function test__my_index test__second_function(const test__my_index)' at test.adb:12:1 has some indirect sub-type changes: + return type changed: + upper bound of range 'test__my_index' change from '100' to '200' + underlying type of range '[101]' changed: + type size changed from 8 to 16 (in bits) + diff --git a/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt b/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt new file mode 100644 index 00000000..45e1c527 --- /dev/null +++ b/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt @@ -0,0 +1,24 @@ +Leaf changes summary: 4 artifacts changed +Changed leaf types summary: 2 leaf types changed +Removed/Changed/Added functions summary: 0 Removed, 2 Changed, 0 Added function +Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable + +2 functions with some sub-type change: + + [C] 'function test__my_int[101] test__first_function(test__my_int[101]&)' at test.adb:6:1 has some sub-type changes: + return type changed: + type name changed from 'test__my_int[101]' to 'test__my_int[201]' + array type size changed from 101000 to 201000 + array type subrange 1 changed length from 101 to 201 + + [C] 'function test__my_index test__second_function(const test__my_index)' at test.adb:12:1 has some sub-type changes: + return type changed: + upper bound of range 'test__my_index' change from '100' to '200' + parameter 1 of type 'const test__my_index' changed: + in unqualified underlying type '[101]': + upper bound of range 'test__my_index' change from '100' to '200' + +'test__Tmy_indexB' changed: + type size changed from 8 to 16 (in bits) +'[101]' changed: + upper bound of range 'test__my_index' change from '100' to '200' diff --git a/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.adb b/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.adb new file mode 100644 index 00000000..98b0315f --- /dev/null +++ b/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.adb @@ -0,0 +1,17 @@ +-- Compile this file with: +-- gcc -g -c test.adb + +package body Test is + +function First_Function (A: My_Int_Array) return My_Int_Array is +begin + return A; +end First_Function; + + +function Second_Function (A: My_Index) return My_Index is +begin + return My_Index'Last; +end Second_Function; + +end Test; diff --git a/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.ads b/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.ads new file mode 100644 index 00000000..66a57f8b --- /dev/null +++ b/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.ads @@ -0,0 +1,11 @@ +package Test is + +type My_Int is range 0 .. 1000; +type My_Index is range 0 .. 100; +type My_Int_Array is array (My_Index) of My_Int; + +function First_Function (A: My_Int_Array) return My_Int_Array; + +function Second_Function (A: My_Index) return My_Index; + +end Test; \ No newline at end of file diff --git a/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.o b/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.o new file mode 100644 index 0000000000000000000000000000000000000000..483ab7c1590989ef18726e515345bd49ad3b74bc GI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IJbQ_tV%dXEijC@=U#?XNth;lys?$b~9GgiTbnL|V z?sPUio|wo^?9T3<*pt|K!gUgs?UN&w-IYj{5~+&csJi=0Zq@b5b70!u-2DFLi+fXh z_iV@u@;oFm^R0K3OJtt93K?e z7eX8y7`$X0?(aSU1TfL}GU6a=*RtQ3RRr|ErMyC@BY^!!!+3H%)L>p+;=!K}IRG#_ zp1_DlXV{K3MR(hXXr_o9+8gk`h}Bk2v8ip4_6W4Yk$hB*080`M$BPm^(e@I4o^U=E zkAgi!X9>F2xB7Er)q*J4-ssc>LEuQ2~;)%Zd{9IJ+>I?8a^2*mNo zKS%cC8cwFzP6~d<^|^rl9O2lHx`D_ZkKoa-HL2mao=^^kjmii4ocHS*{x#XBH2it8 z&uI8bvSHUL;r#h~eM&gykK^(cca3o7^LOXDAU}Gf4{Cfe#ST)Ck9EF4Hr_NSjQuD@vs)@LcK21p1WYD9kz!0n=oLBZ- ztx|E}CQMgrzMFMxwpwKRU7F=ueRuV{u1@;&gYAsU2$n{|D_p)U@SR*f9@+s ziv9~BT63f%;lcRmnnC;re1YhE-F_B0xX1PQdl=k7XnCxAa9!ybIywICIx|#sF0NNR zS8}0y{rw{qWS#=>TtOb6N4&oF1E%+hoqR^%B{U+UbB}{h$B_Oc6)GEvMOEj%23V*3 zbCf8@WB$1B^!%L;eF7wo(fD~ZBBGCv{!ZgB(m+j$#qseL)5l)~4Ey9fK~?f4jsHCZ z)bjY;z5{rtc#js;FcbeK9@lrL_z!SWAovS7D%>5nAA^(iDDNwZk7B6n+|L2S??Tf> zijwOTuh)g^$GjV$V4r&YD#dgCnXkux0}iC-m_Y3+5iPRu`whaw@x1;!jg29v>C#Nl qgz>)+jMd|DP3U_cAaQ~AAK!C`q3HF)-zA;mv-Fc`MMbq=di-CLl(p3W literal 0 HcmV?d00001 diff --git a/tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt b/tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt --- a/tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt +++ b/tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt @@ -16,6 +16,9 @@ Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable [C] 'function const int foo2(S2&)' at test45-basic-type-change-v1.cc:32:1 has some sub-type changes: return type changed: 'const int' changed to 'const char' + in unqualified underlying type 'int': + type name changed from 'int' to 'char' + type size changed from 32 to 8 (in bits) [C] 'function int foo3(S2&)' at test45-basic-type-change-v1.cc:36:1 has some sub-type changes: return type changed: diff --git a/tests/test-abidiff-exit.cc b/tests/test-abidiff-exit.cc index 22bc9b77..3733dce9 100644 --- a/tests/test-abidiff-exit.cc +++ b/tests/test-abidiff-exit.cc @@ -702,6 +702,28 @@ InOutSpec in_out_specs[] = "data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-2.txt", "output/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-2.txt" }, + { + "data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.o", + "data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.o", + "", + "", + "", + "--no-default-suppression", + abigail::tools_utils::ABIDIFF_ABI_CHANGE, + "data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt", + "output/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt" + }, + { + "data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.o", + "data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.o", + "", + "", + "", + "--no-default-suppression --leaf-changes-only", + abigail::tools_utils::ABIDIFF_ABI_CHANGE, + "data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt", + "output/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt" + }, #ifdef WITH_BTF { "data/test-abidiff-exit/btf/test0-v0.o",