[applied] Bug 29340 - Add support for Ada range types

Message ID 87355kmxft.fsf@redhat.com
State New
Headers
Series [applied] Bug 29340 - Add support for Ada range types |

Commit Message

Dodji Seketeli March 31, 2023, 9:18 p.m. UTC
  Hello,

Libabigail doesn't yet support generic range types like in Ada.
Ranges are supported as a kind of implementation detail of array
types.  But then its use like in the construct below is not supported:

    type My_Int is range 0 .. 5;
    function My_Function return My_Int;

Here, the integer type "My_Int" can take the discrete values that go
from 0 to 5.  It's represented in the DWARF debug info as being a
range type of length 6 and whose underlying type has a size of 8 bits.

This patch adds support for a range type to be (de-)serialized from
and to abixml, diffed, diff-analyzed and diff-reported.

The ABIXML version number has been bumped from 2.1 to 2.2 accordingly.

	* configure.ac: Bump the abixml version to 2.2 from 2.1
	* include/abg-comparison.h (diff_maps::get_subrange_diff_map):
	Declare new member functions.
	(class subrange_diff): Define new class.
	(subrange_diff_sptr): Define new typedef.
	(compute_diff): New overload for subrange_diff.
	(is_subrange_diff): Declare new function.
	* include/abg-ir.h (equals): Declare an overload for
	subrange_type.
	* include/abg-reporter.h (reporter_base::report): Declare an
	overload for subrange_diff.
	(default_reporter::report_underlying_changes_of_qualified_type):
	Declare member function.
	(leaf_reporter::report): Declare and overload for subrange_diff.
	Declare new member function.
	* include/abg-tools-utils.h
	(get_anonymous_subrange_internal_name_prefix): Declare new function.
	* src/abg-comparison-priv.h (struct subrange_diff::priv): Define
	new type.
	* src/abg-comparison.cc (diff_maps::priv::subrange_diff_map_):
	Define data member.
	(diff_maps::get_subrange_diff_map): Define member function.
	(is_subrange_diff, compute_diff): Define new functions.
	(compute_diff_for_types): Handle array_type::subrange_type types.
	(subrange_diff::{subrange_diff, first_subrange, second_subrange,
	get_pretty_representation, has_changes, has_local_changes, report,
	chain_into_hierarchy}): Define member functions.
	(diff_maps::insert_diff_node): Handle subrange diff nodes.
	(corpus_diff::priv::count_leaf_type_changes): Count subranges diff
	nodes.
	* src/abg-default-reporter.cc (default_reporter::report): Define
	an overload for subrange_diff.
	* src/abg-ir.cc (has_generic_anonymous_internal_type_name):
	Support subrange types.
	* src/abg-leaf-reporter.cc (report_type_changes_from_diff_maps):
	Report about subrange types.
	(leaf_reporter::report): Define and overload for subrange_diff
	nodes.
	* src/abg-reader.cc (build_subrange_type): Add a boolean to add
	the subrange type to the current scope.
	(build_array_type_def): Adjust when calling build_subrange_type.
	(build_type): Support building subrange types.
	* src/abg-reporter-priv.cc (represent): Define a new overload for
	the subrange_diff type.
	* src/abg-reporter-priv.h (represent): Declare a new overload for
	the subrange_diff type.
	* src/abg-tools-utils.cc (ANONYMOUS_SUBRANGE_INTERNAL_NAME)
	(ANONYMOUS_SUBRANGE_INTERNAL_NAME_LEN): Define new static const
	variables.
	(get_anonymous_subrange_internal_name_prefix): Define new
	function.
	* src/abg-writer.cc (write_array_subrange_type): Define new static
	function.
	(write_decl): Support emitting subrange_types.
	* tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-1.txt:
	New reference output.
	* tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-2.txt:
	Likewise.
	* tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.ad{b,s}:
	Source code of the input binary below.
	* tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.o:
	New input test.
	* tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.ad{b,s}:
	Source code of the input binary below.
	* tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.o:
	New input test.
	* tests/data/Makefile.am: Add the new test files to source
	distributions.
	* tests/test-abidiff-exit.cc (in_out_specs): Add the new tests
	input above to this test harness.
	* tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi:
	Adjust.
	* tests/data/test-annotate/libtest23.so.abi: Likewise.
	* tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Likewise.
	* tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
	* tests/data/test-annotate/test-anonymous-members-0.o.abi:
	Likewise.
	* tests/data/test-annotate/test0.abi: Likewise.
	* tests/data/test-annotate/test1.abi: Likewise.
	* tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
	* tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
	* tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
	* tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
	* tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
	Likewise.
	* tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
	Likewise.
	* tests/data/test-annotate/test2.so.abi: Likewise.
	* tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
	Likewise.
	* tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
	* tests/data/test-annotate/test3.so.abi: Likewise.
	* tests/data/test-annotate/test4.so.abi: Likewise.
	* tests/data/test-annotate/test5.o.abi: Likewise.
	* tests/data/test-annotate/test6.so.abi: Likewise.
	* tests/data/test-annotate/test7.so.abi: Likewise.
	* tests/data/test-annotate/test8-qualified-this-pointer.so.abi:
	Likewise.
	* tests/data/test-read-btf/test0.o.abi: Likewise.
	* tests/data/test-read-btf/test1.o.abi: Likewise.
	* tests/data/test-read-ctf/PR27700/test-PR27700.abi: Likewise.
	* tests/data/test-read-ctf/test-PR26568-1.o.abi: Likewise.
	* tests/data/test-read-ctf/test-PR26568-2.o.abi: Likewise.
	* tests/data/test-read-ctf/test-alias.o.abi: Likewise.
	* tests/data/test-read-ctf/test-ambiguous-struct-A.o.hash.abi:
	Likewise.
	* tests/data/test-read-ctf/test-ambiguous-struct-B.o.hash.abi:
	Likewise.
	* tests/data/test-read-ctf/test-anonymous-fields.o.abi: Likewise.
	* tests/data/test-read-ctf/test-array-mdimension.abi: Likewise.
	* tests/data/test-read-ctf/test-array-of-pointers.abi: Likewise.
	* tests/data/test-read-ctf/test-array-size.abi: Likewise.
	* tests/data/test-read-ctf/test-bitfield-enum.abi: Likewise.
	* tests/data/test-read-ctf/test-bitfield.abi: Likewise.
	* tests/data/test-read-ctf/test-callback.abi: Likewise.
	* tests/data/test-read-ctf/test-callback2.abi: Likewise.
	* tests/data/test-read-ctf/test-conflicting-type-syms-a.o.hash.abi:
	Likewise.
	* tests/data/test-read-ctf/test-conflicting-type-syms-b.o.hash.abi:
	Likewise.
	* tests/data/test-read-ctf/test-const-array.abi: Likewise.
	* tests/data/test-read-ctf/test-dynamic-array.o.abi: Likewise.
	* tests/data/test-read-ctf/test-enum-many.o.hash.abi: Likewise.
	* tests/data/test-read-ctf/test-enum-symbol.o.hash.abi: Likewise.
	* tests/data/test-read-ctf/test-enum.o.abi: Likewise.
	* tests/data/test-read-ctf/test-fallback.abi: Likewise.
	* tests/data/test-read-ctf/test-forward-type-decl.abi: Likewise.
	* tests/data/test-read-ctf/test-functions-declaration.abi:
	Likewise.
	* tests/data/test-read-ctf/test-linux-module.abi: Likewise.
	* tests/data/test-read-ctf/test-list-struct.abi: Likewise.
	* tests/data/test-read-ctf/test0.abi: Likewise.
	* tests/data/test-read-ctf/test0.hash.abi: Likewise.
	* tests/data/test-read-ctf/test1.so.abi: Likewise.
	* tests/data/test-read-ctf/test1.so.hash.abi: Likewise.
	* tests/data/test-read-ctf/test2.so.abi: Likewise.
	* tests/data/test-read-ctf/test2.so.hash.abi: Likewise.
	* tests/data/test-read-ctf/test3.so.abi: Likewise.
	* tests/data/test-read-ctf/test3.so.hash.abi: Likewise.
	* tests/data/test-read-ctf/test4.so.abi: Likewise.
	* tests/data/test-read-ctf/test4.so.hash.abi: Likewise.
	* tests/data/test-read-ctf/test5.o.abi: Likewise.
	* tests/data/test-read-ctf/test7.o.abi: Likewise.
	* tests/data/test-read-ctf/test8.o.abi: Likewise.
	* tests/data/test-read-ctf/test9.o.abi: Likewise.
	* tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
	* tests/data/test-read-dwarf/PR24378-fn-is-not-scope.abi:
	Likewise.
	* tests/data/test-read-dwarf/PR25007-sdhci.ko.abi: Likewise.
	* tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi:
	Likewise.
	* tests/data/test-read-dwarf/PR26261/PR26261-exe.abi: Likewise.
	* tests/data/test-read-dwarf/PR27700/test-PR27700.abi: Likewise.
	* tests/data/test-read-dwarf/PR28584/PR28584-smv.clang.o.abi:
	Likewise.
	* tests/data/test-read-dwarf/PR29443-missing-xx.o.abi: Likewise.
	* tests/data/test-read-dwarf/PR29692-kdelibs3-libkjava.so.1.0.0.abi:
	Likewise.
	* tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
	* tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
	* tests/data/test-read-dwarf/test-PR26568-1.o.abi: Likewise.
	* tests/data/test-read-dwarf/test-PR26568-2.o.abi: Likewise.
	* tests/data/test-read-dwarf/test-fallback.abi: Likewise.
	* tests/data/test-read-dwarf/test-libaaudio.so.abi: Likewise.
	* tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise.
	* tests/data/test-read-dwarf/test-suppressed-alias.o.abi:
	Likewise.
	* tests/data/test-read-dwarf/test0.abi: Likewise.
	* tests/data/test-read-dwarf/test0.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test1.abi: Likewise.
	* tests/data/test-read-dwarf/test1.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
	* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
	* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
	* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
	* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
	* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
	* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
	* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
	* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/test2.so.abi: Likewise.
	* tests/data/test-read-dwarf/test2.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
	* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/test3-alias-1.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test3-alias-2.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test3-alias-3.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test3-alias-4.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test3.so.abi: Likewise.
	* tests/data/test-read-dwarf/test3.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test4.so.abi: Likewise.
	* tests/data/test-read-dwarf/test4.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test5.o.abi: Likewise.
	* tests/data/test-read-dwarf/test5.o.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test6.so.abi: Likewise.
	* tests/data/test-read-dwarf/test6.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test7.so.abi: Likewise.
	* tests/data/test-read-dwarf/test7.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi: Likewise.
	* tests/data/test-read-dwarf/test8-qualified-this-pointer.so.hash.abi: Likewise.
	* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
	* tests/data/test-read-write/test-crc.xml: Likewise.
	* tests/data/test-read-write/test26.xml: Likewise.
	* tests/data/test-read-write/test27.xml: Likewise.
	* tests/data/test-read-write/test28-without-std-fns-ref.xml: Likewise.
	* tests/data/test-read-write/test28-without-std-vars-ref.xml:
	Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
 configure.ac                                  |  10 +-
 include/abg-comparison.h                      |  64 +++++++
 include/abg-ir.h                              |   5 +
 include/abg-reporter.h                        |  18 ++
 include/abg-tools-utils.h                     |   1 +
 src/abg-comparison-priv.h                     |  11 ++
 src/abg-comparison.cc                         | 167 ++++++++++++++++++
 src/abg-default-reporter.cc                   |  22 +++
 src/abg-ir.cc                                 |   7 +-
 src/abg-leaf-reporter.cc                      |  27 +++
 src/abg-reader.cc                             |  13 +-
 src/abg-reporter-priv.cc                      |  71 ++++++++
 src/abg-reporter-priv.h                       |   7 +
 src/abg-tools-utils.cc                        |  17 +-
 src/abg-writer.cc                             |   6 +
 tests/data/Makefile.am                        |   8 +
 .../test1-ada-subrange-report-1.txt           |  15 ++
 .../test1-ada-subrange-report-2.txt           |  19 ++
 .../test1-ada-subrange/v0/test1.adb           |  19 ++
 .../test1-ada-subrange/v0/test1.ads           |  11 ++
 .../test1-ada-subrange/v0/test1.o             | Bin 0 -> 3792 bytes
 .../test1-ada-subrange/v1/test1.adb           |  19 ++
 .../test1-ada-subrange/v1/test1.ads           |  11 ++
 .../test1-ada-subrange/v1/test1.o             | Bin 0 -> 3824 bytes
 .../PR29443-missing-xx.o.annotated.abi        |   2 +-
 tests/data/test-annotate/libtest23.so.abi     |   2 +-
 .../test-annotate/libtest24-drop-fns-2.so.abi |   2 +-
 .../test-annotate/libtest24-drop-fns.so.abi   |   2 +-
 .../test-anonymous-members-0.o.abi            |   2 +-
 tests/data/test-annotate/test0.abi            |   2 +-
 tests/data/test-annotate/test1.abi            |   2 +-
 .../data/test-annotate/test13-pr18894.so.abi  |   2 +-
 .../data/test-annotate/test14-pr18893.so.abi  |   2 +-
 .../data/test-annotate/test15-pr18892.so.abi  |   2 +-
 .../data/test-annotate/test17-pr19027.so.abi  |   2 +-
 ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi |   2 +-
 ...19-pr19023-libtcmalloc_and_profiler.so.abi |   2 +-
 tests/data/test-annotate/test2.so.abi         |   2 +-
 ...st20-pr19025-libvtkParallelCore-6.1.so.abi |   2 +-
 .../data/test-annotate/test21-pr19092.so.abi  |   2 +-
 tests/data/test-annotate/test3.so.abi         |   2 +-
 tests/data/test-annotate/test4.so.abi         |   2 +-
 tests/data/test-annotate/test5.o.abi          |   2 +-
 tests/data/test-annotate/test6.so.abi         |   2 +-
 tests/data/test-annotate/test7.so.abi         |   2 +-
 .../test8-qualified-this-pointer.so.abi       |   2 +-
 tests/data/test-read-btf/test0.o.abi          |   2 +-
 tests/data/test-read-btf/test1.o.abi          |   2 +-
 .../test-read-ctf/PR27700/test-PR27700.abi    |   2 +-
 tests/data/test-read-ctf/test-PR26568-1.o.abi |   2 +-
 tests/data/test-read-ctf/test-PR26568-2.o.abi |   2 +-
 tests/data/test-read-ctf/test-alias.o.abi     |   2 +-
 .../test-ambiguous-struct-A.o.hash.abi        |   2 +-
 .../test-ambiguous-struct-B.o.hash.abi        |   2 +-
 .../test-read-ctf/test-anonymous-fields.o.abi |   2 +-
 .../test-read-ctf/test-array-mdimension.abi   |   2 +-
 .../test-read-ctf/test-array-of-pointers.abi  |   2 +-
 tests/data/test-read-ctf/test-array-size.abi  |   2 +-
 .../data/test-read-ctf/test-bitfield-enum.abi |   2 +-
 tests/data/test-read-ctf/test-bitfield.abi    |   2 +-
 tests/data/test-read-ctf/test-callback.abi    |   2 +-
 tests/data/test-read-ctf/test-callback2.abi   |   2 +-
 .../test-conflicting-type-syms-a.o.hash.abi   |   2 +-
 .../test-conflicting-type-syms-b.o.hash.abi   |   2 +-
 tests/data/test-read-ctf/test-const-array.abi |   2 +-
 .../test-read-ctf/test-dynamic-array.o.abi    |   2 +-
 .../test-read-ctf/test-enum-many.o.hash.abi   |   2 +-
 .../test-read-ctf/test-enum-symbol.o.hash.abi |   2 +-
 tests/data/test-read-ctf/test-enum.o.abi      |   2 +-
 tests/data/test-read-ctf/test-fallback.abi    |   2 +-
 .../test-read-ctf/test-forward-type-decl.abi  |   2 +-
 .../test-functions-declaration.abi            |   2 +-
 .../data/test-read-ctf/test-linux-module.abi  |   2 +-
 tests/data/test-read-ctf/test-list-struct.abi |   2 +-
 tests/data/test-read-ctf/test0.abi            |   2 +-
 tests/data/test-read-ctf/test0.hash.abi       |   2 +-
 tests/data/test-read-ctf/test1.so.abi         |   2 +-
 tests/data/test-read-ctf/test1.so.hash.abi    |   2 +-
 tests/data/test-read-ctf/test2.so.abi         |   2 +-
 tests/data/test-read-ctf/test2.so.hash.abi    |   2 +-
 tests/data/test-read-ctf/test3.so.abi         |   2 +-
 tests/data/test-read-ctf/test3.so.hash.abi    |   2 +-
 tests/data/test-read-ctf/test4.so.abi         |   2 +-
 tests/data/test-read-ctf/test4.so.hash.abi    |   2 +-
 tests/data/test-read-ctf/test5.o.abi          |   2 +-
 tests/data/test-read-ctf/test7.o.abi          |   2 +-
 tests/data/test-read-ctf/test8.o.abi          |   2 +-
 tests/data/test-read-ctf/test9.o.abi          |   2 +-
 .../PR22015-libboost_iostreams.so.abi         |   2 +-
 .../test-read-dwarf/PR22122-libftdc.so.abi    |   2 +-
 .../PR24378-fn-is-not-scope.abi               |   2 +-
 .../data/test-read-dwarf/PR25007-sdhci.ko.abi |   2 +-
 .../PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi |   2 +-
 .../test-read-dwarf/PR26261/PR26261-exe.abi   |   2 +-
 .../test-read-dwarf/PR27700/test-PR27700.abi  |   2 +-
 .../PR28584/PR28584-smv.clang.o.abi           |   2 +-
 .../test-read-dwarf/PR29443-missing-xx.o.abi  |   2 +-
 .../PR29692-kdelibs3-libkjava.so.1.0.0.abi    |   2 +-
 tests/data/test-read-dwarf/libtest23.so.abi   |   2 +-
 .../libtest24-drop-fns-2.so.abi               |   2 +-
 .../test-read-dwarf/libtest24-drop-fns.so.abi |   2 +-
 .../data/test-read-dwarf/test-PR26568-1.o.abi |   2 +-
 .../data/test-read-dwarf/test-PR26568-2.o.abi |   2 +-
 tests/data/test-read-dwarf/test-fallback.abi  |   2 +-
 .../test-read-dwarf/test-libaaudio.so.abi     |   2 +-
 .../test-read-dwarf/test-libandroid.so.abi    |   2 +-
 .../test-suppressed-alias.o.abi               |   2 +-
 tests/data/test-read-dwarf/test0.abi          |   2 +-
 tests/data/test-read-dwarf/test0.hash.abi     |   2 +-
 tests/data/test-read-dwarf/test1.abi          |   2 +-
 tests/data/test-read-dwarf/test1.hash.abi     |   2 +-
 .../test-read-dwarf/test10-pr18818-gcc.so.abi |   2 +-
 .../test-read-dwarf/test11-pr18828.so.abi     |   2 +-
 .../test-read-dwarf/test12-pr18844.so.abi     |   2 +-
 .../test-read-dwarf/test13-pr18894.so.abi     |   2 +-
 .../test-read-dwarf/test14-pr18893.so.abi     |   2 +-
 .../test-read-dwarf/test15-pr18892.so.abi     |   2 +-
 .../test-read-dwarf/test16-pr18904.so.abi     |   2 +-
 .../test-read-dwarf/test17-pr19027.so.abi     |   2 +-
 ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi |   2 +-
 ...19-pr19023-libtcmalloc_and_profiler.so.abi |   2 +-
 tests/data/test-read-dwarf/test2.so.abi       |   2 +-
 tests/data/test-read-dwarf/test2.so.hash.abi  |   2 +-
 ...st20-pr19025-libvtkParallelCore-6.1.so.abi |   2 +-
 .../test-read-dwarf/test21-pr19092.so.abi     |   2 +-
 .../test22-pr19097-libstdc++.so.6.0.17.so.abi |   2 +-
 .../test-read-dwarf/test3-alias-1.so.hash.abi |   2 +-
 .../test-read-dwarf/test3-alias-2.so.hash.abi |   2 +-
 .../test-read-dwarf/test3-alias-3.so.hash.abi |   2 +-
 .../test-read-dwarf/test3-alias-4.so.hash.abi |   2 +-
 tests/data/test-read-dwarf/test3.so.abi       |   2 +-
 tests/data/test-read-dwarf/test3.so.hash.abi  |   2 +-
 tests/data/test-read-dwarf/test4.so.abi       |   2 +-
 tests/data/test-read-dwarf/test4.so.hash.abi  |   2 +-
 tests/data/test-read-dwarf/test5.o.abi        |   2 +-
 tests/data/test-read-dwarf/test5.o.hash.abi   |   2 +-
 tests/data/test-read-dwarf/test6.so.abi       |   2 +-
 tests/data/test-read-dwarf/test6.so.hash.abi  |   2 +-
 tests/data/test-read-dwarf/test7.so.abi       |   2 +-
 tests/data/test-read-dwarf/test7.so.hash.abi  |   2 +-
 .../test8-qualified-this-pointer.so.abi       |   2 +-
 .../test8-qualified-this-pointer.so.hash.abi  |   2 +-
 .../test9-pr18818-clang.so.abi                |   2 +-
 tests/data/test-read-write/test-crc.xml       |   2 +-
 tests/data/test-read-write/test26.xml         |   2 +-
 tests/data/test-read-write/test27.xml         |   2 +-
 .../test28-without-std-fns-ref.xml            |   2 +-
 .../test28-without-std-vars-ref.xml           |   2 +-
 tests/test-abidiff-exit.cc                    |  22 +++
 149 files changed, 685 insertions(+), 133 deletions(-)
 create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-1.txt
 create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-2.txt
 create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.adb
 create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.ads
 create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.o
 create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.adb
 create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.ads
 create mode 100644 tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.o

new file mode 100644
index 00000000..3872dace
index 74d33acb..506ba75b 100644
  

Patch

diff --git a/configure.ac b/configure.ac
index 56437ef5..63d54ea2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,8 +65,16 @@  AM_SILENT_RULES([yes])
 VERSION_MAJOR=version_major
 VERSION_MINOR=version_minor
 VERSION_REVISION=0
+dnl The major version number of the abixml version should be changed
+dnl only if a new version of libabigail cannot read an old version of
+dnl abixml.  This should be very rare and should be avoided as much as
+dnl possible.
 ABIXML_VERSION_MAJOR=2
-ABIXML_VERSION_MINOR=1
+dnl The minor version number of the abixml version should be changed
+dnl each time and old version of libabigail can't handle a new version
+dnl of abixml.  Note however that when the major version number is
+dnl changed, the minor version number should be set to zero.
+ABIXML_VERSION_MINOR=2
 LIBABIGAIL_SO_CURRENT=libabigail_so_current
 LIBABIGAIL_SO_REVISION=libabigail_so_revision
 LIBABIGAIL_SO_AGE=libabigail_so_age
diff --git a/include/abg-comparison.h b/include/abg-comparison.h
index 2addb7ac..15ce1651 100644
--- a/include/abg-comparison.h
+++ b/include/abg-comparison.h
@@ -548,6 +548,12 @@  public:
   string_diff_ptr_map&
   get_typedef_diff_map();
 
+  const string_diff_ptr_map&
+  get_subrange_diff_map() const;
+
+  string_diff_ptr_map&
+  get_subrange_diff_map();
+
   const string_diff_ptr_map&
   get_array_diff_map() const;
 
@@ -1409,6 +1415,61 @@  compute_diff(reference_type_def_sptr first,
 	     reference_type_def_sptr second,
 	     diff_context_sptr ctxt);
 
+
+class subrange_diff;
+
+/// A convenience typedef for a shared pointer to subrange_diff type.
+typedef shared_ptr<subrange_diff> subrange_diff_sptr;
+
+/// The abstraction of the diff between two subrange types.
+class subrange_diff : public type_diff_base
+{
+  struct priv;
+  std::unique_ptr<priv> priv_;
+
+protected:
+  subrange_diff(const array_type_def::subrange_sptr&	first,
+		const array_type_def::subrange_sptr&	second,
+		const diff_sptr&			underlying_type_diff,
+		const diff_context_sptr		ctxt = diff_context_sptr());
+
+public:
+  const array_type_def::subrange_sptr
+  first_subrange() const;
+
+  const array_type_def::subrange_sptr
+  second_subrange() const;
+
+  const diff_sptr
+  underlying_type_diff() const;
+
+  virtual const string&
+  get_pretty_representation() const;
+
+  virtual bool
+  has_changes() const;
+
+  virtual enum change_kind
+  has_local_changes() const;
+
+  virtual void
+  report(ostream&, const string& indent = "") const;
+
+  virtual void
+  chain_into_hierarchy();
+
+  friend subrange_diff_sptr
+  compute_diff(array_type_def::subrange_sptr first,
+	       array_type_def::subrange_sptr second,
+	       diff_context_sptr ctxt);
+}; // end subrange_diff
+
+subrange_diff_sptr
+compute_diff(array_type_def::subrange_sptr first,
+	     array_type_def::subrange_sptr second,
+	     diff_context_sptr ctxt);
+
+
 class array_diff;
 
 /// Convenience typedef for a shared pointer on a @ref
@@ -2855,6 +2916,9 @@  is_class_or_union_diff(const diff* d);
 const class_or_union_diff*
 is_anonymous_class_or_union_diff(const diff* d);
 
+const subrange_diff*
+is_subrange_diff(const diff* diff);
+
 const array_diff*
 is_array_diff(const diff* diff);
 
diff --git a/include/abg-ir.h b/include/abg-ir.h
index 6d81097a..d25e3a8c 100644
--- a/include/abg-ir.h
+++ b/include/abg-ir.h
@@ -2652,6 +2652,11 @@  is_subrange_type(const type_or_decl_base *type);
 array_type_def::subrange_sptr
 is_subrange_type(const type_or_decl_base_sptr &type);
 
+bool
+equals(const array_type_def::subrange_type&,
+       const array_type_def::subrange_type&,
+       change_kind*);
+
 bool
 equals(const enum_type_decl&, const enum_type_decl&, change_kind*);
 
diff --git a/include/abg-reporter.h b/include/abg-reporter.h
index 6b16f13c..8104c653 100644
--- a/include/abg-reporter.h
+++ b/include/abg-reporter.h
@@ -32,6 +32,7 @@  class qualified_type_diff;
 class distinct_diff;
 class pointer_diff;
 class reference_diff;
+class subrange_diff;
 class array_diff;
 class base_diff;
 class class_or_union_diff;
@@ -92,6 +93,10 @@  public:
   report(const array_diff& d, std::ostream& out,
 	 const std::string& indent = "") const = 0;
 
+  virtual void
+  report(const subrange_diff& d, std::ostream& out,
+	 const std::string& indent = "") const = 0;
+
   virtual void
   report(const base_diff& d, std::ostream& out,
 	 const std::string& indent = "") const = 0;
@@ -173,6 +178,11 @@  public:
 				      std::ostream& out,
 				      const std::string& indent) const;
 
+  void
+  report_underlying_changes_of_qualified_type (const qualified_type_diff& d,
+					       ostream& out,
+					       const string& indent) const;
+
   virtual void
   report(const qualified_type_diff& d, std::ostream& out,
 	 const std::string& indent = "") const;
@@ -203,6 +213,10 @@  public:
   report(const function_type_diff& d, std::ostream& out,
 	 const std::string& indent = "") const;
 
+  virtual void
+  report(const subrange_diff& d, std::ostream& out,
+	 const std::string& indent = "") const;
+
   virtual void
   report(const array_diff& d, std::ostream& out,
 	 const std::string& indent = "") const;
@@ -285,6 +299,10 @@  public:
   report(const function_type_diff& d, std::ostream& out,
 	 const std::string& indent = "") const;
 
+  virtual void
+  report(const subrange_diff& d, std::ostream& out,
+	 const std::string& indent = "") const;
+
   virtual void
   report(const array_diff& d, std::ostream& out,
 	 const std::string& indent = "") const;
diff --git a/include/abg-tools-utils.h b/include/abg-tools-utils.h
index 43bf6a3e..930557b5 100644
--- a/include/abg-tools-utils.h
+++ b/include/abg-tools-utils.h
@@ -34,6 +34,7 @@  const char* get_system_libdir();
 const char* get_anonymous_struct_internal_name_prefix();
 const char* get_anonymous_union_internal_name_prefix();
 const char* get_anonymous_enum_internal_name_prefix();
+const char* get_anonymous_subrange_internal_name_prefix();
 
 bool file_exists(const string&);
 bool is_regular_file(const string&);
diff --git a/src/abg-comparison-priv.h b/src/abg-comparison-priv.h
index 29d2d2ac..481fc9c6 100644
--- a/src/abg-comparison-priv.h
+++ b/src/abg-comparison-priv.h
@@ -414,6 +414,17 @@  struct pointer_diff::priv
   {}
 };//end struct pointer_diff::priv
 
+/// The internal type for the impl idiom implementation of @ref
+/// subrange_diff.
+struct subrange_diff::priv
+{
+  diff_sptr underlying_type_diff_;
+
+  priv(diff_sptr u)
+    : underlying_type_diff_(u)
+  {}
+}; // end struct subrange_diff::priv
+
 struct array_diff::priv
 {
   /// The diff between the two array element types.
diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc
index baae56a3..c4596c8e 100644
--- a/src/abg-comparison.cc
+++ b/src/abg-comparison.cc
@@ -694,6 +694,16 @@  const typedef_diff*
 is_typedef_diff(const diff *diff)
 {return dynamic_cast<const typedef_diff*>(diff);}
 
+/// Test if a diff node is a @ref subrange_diff node.
+///
+/// @param diff the diff node to consider.
+///
+/// @return a non-nil pointer to a @ref subrange_diff iff @p diff is a
+/// @ref subrange_diff node.
+const subrange_diff*
+is_subrange_diff(const diff* diff)
+{return dynamic_cast<const subrange_diff*>(diff);}
+
 /// Test if a diff node is a @ref array_diff node.
 ///
 /// @param diff the diff node to consider.
@@ -3033,6 +3043,7 @@  compute_diff_for_types(const type_or_decl_base_sptr& first,
    ||(d = try_to_diff<class_decl>(f, s,ctxt))
    ||(d = try_to_diff<pointer_type_def>(f, s, ctxt))
    ||(d = try_to_diff<reference_type_def>(f, s, ctxt))
+   ||(d = try_to_diff<array_type_def::subrange_type>(f, s, ctxt))
    ||(d = try_to_diff<array_type_def>(f, s, ctxt))
    ||(d = try_to_diff<qualified_type_def>(f, s, ctxt))
    ||(d = try_to_diff<typedef_decl>(f, s, ctxt))
@@ -3714,6 +3725,143 @@  compute_diff(pointer_type_def_sptr	first,
 
 // </pointer_type_def>
 
+// <subrange_diff >
+
+/// Constructor of the @ref subrange_diff diff node type.
+///
+/// @param first the first subrange type to consider for the diff.
+///
+/// @param second the second subrange type to consider for the diff.
+///
+/// @param underlying_type_diff the underlying type diff between @p
+/// first and @p second.
+///
+/// @param ctxt the diff context to use.
+subrange_diff::subrange_diff
+(const array_type_def::subrange_sptr&	first,
+ const array_type_def::subrange_sptr&	second,
+ const diff_sptr&			underlying_type_diff,
+ const diff_context_sptr		ctxt)
+  : type_diff_base(first, second, ctxt),
+    priv_(new priv(underlying_type_diff))
+{}
+
+
+/// Getter of the first subrange of the current instance @ref
+/// subrange_diff.
+///
+/// @return The first subrange of the current instance @ref subrange_diff.
+const array_type_def::subrange_sptr
+subrange_diff::first_subrange() const
+{return is_subrange_type(first_subject());}
+
+/// Getter of the second subrange of the current instance @ref
+/// subrange_diff.
+///
+/// @return The second subrange of the current instance @ref
+/// subrange_diff.
+const array_type_def::subrange_sptr
+subrange_diff::second_subrange() const
+{return is_subrange_type(second_subject());}
+
+/// Getter of the diff node of the underlying types of the current
+/// @ref subrange_diff diff node.
+///
+/// @return The diff node of the underlying types of the current @ref
+/// subrange_diff diff node.
+const diff_sptr
+subrange_diff::underlying_type_diff() const
+{return priv_->underlying_type_diff_;}
+
+/// Getter the pretty representation of the @ref subrange_diff diff
+/// node.
+///
+/// @return The pretty representation of the @ref subrange_diff diff node.
+const string&
+subrange_diff::get_pretty_representation() const
+{
+    if (diff::priv_->pretty_representation_.empty())
+    {
+      std::ostringstream o;
+      o << "subrange_diff["
+	<< first_subject()->get_pretty_representation()
+	<< ","
+	<< second_subject()->get_pretty_representation()
+	<< "]";
+      diff::priv_->pretty_representation_ = o.str();
+    }
+    return diff::priv_->pretty_representation_;
+}
+
+/// Test if the current @ref subrange_diff node carries any change.
+///
+/// @return true iff the current @ref subrange_diff node carries any
+/// change.
+bool
+subrange_diff::has_changes() const
+{return *first_subrange() != *second_subrange();}
+
+/// Test if the current @ref subrange_diff node carries any local
+/// change.
+///
+/// @return true iff the current @ref subrange_diff node carries any
+/// local change.
+enum change_kind
+subrange_diff::has_local_changes() const
+{
+  ir::change_kind k = ir::NO_CHANGE_KIND;
+  if (!equals(*first_subrange(), *second_subrange(), &k))
+    return k & ir::ALL_LOCAL_CHANGES_MASK;
+  return ir::NO_CHANGE_KIND;
+}
+
+/// Report about the changes carried by this node.
+///
+/// @param out the output stream to send the report to.
+///
+/// @param indent the indentation string to use.
+void
+subrange_diff::report(ostream& out, const string& indent) const
+{context()->get_reporter()->report(*this, out, indent);}
+
+/// Populate the vector of children node of the @ref diff base type
+/// sub-object of this instance of @ref subrange_diff.
+///
+/// The children node can then later be retrieved using
+/// diff::children_node().
+void
+subrange_diff::chain_into_hierarchy()
+{append_child_node(underlying_type_diff());}
+
+/// Compute the diff between two instances of @ref subrange_diff.
+///
+/// Note that the two decls must have been created in the same @ref
+/// environment, otherwise, this function aborts.
+///
+/// @param first the first @ref subrange_diff to consider for the diff.
+///
+/// @param second the second @ref subrange_diff to consider for the diff.
+///
+/// @param ctxt the diff context to use.
+///
+/// @return the resulting diff between the two @ref subrange_diff.
+subrange_diff_sptr
+compute_diff(array_type_def::subrange_sptr first,
+	     array_type_def::subrange_sptr second,
+	     diff_context_sptr ctxt)
+{
+  diff_sptr d = compute_diff_for_types(first->get_underlying_type(),
+				       second->get_underlying_type(),
+				       ctxt);
+
+  subrange_diff_sptr result(new subrange_diff(first, second, d, ctxt));
+  ctxt->initialize_canonical_diff(result);
+  return result;
+}
+
+//</subrange_diff >
+
+
 // <array_type_def>
 
 /// Populate the vector of children node of the @ref diff base type
@@ -7793,6 +7941,7 @@  struct diff_maps::priv
   string_diff_ptr_map class_diff_map_;
   string_diff_ptr_map union_diff_map_;
   string_diff_ptr_map typedef_diff_map_;
+  string_diff_ptr_map subrange_diff_map_;
   string_diff_ptr_map array_diff_map_;
   string_diff_ptr_map reference_diff_map_;
   string_diff_ptr_map function_type_diff_map_;
@@ -7880,6 +8029,20 @@  string_diff_ptr_map&
 diff_maps::get_typedef_diff_map()
 {return priv_->typedef_diff_map_;}
 
+/// Getter of the map that contains subrange type diffs.
+///
+/// @return the map that contains subrange type diffs.
+const string_diff_ptr_map&
+diff_maps::get_subrange_diff_map() const
+{return priv_->subrange_diff_map_;}
+
+/// Getter of the map that contains subrange type diffs.
+///
+/// @return the map that contains subrange type diffs.
+string_diff_ptr_map&
+diff_maps::get_subrange_diff_map()
+{return priv_->subrange_diff_map_;}
+
 /// Getter of the map that contains array type diffs.
 ///
 /// @return the map that contains array type diffs.
@@ -8007,6 +8170,8 @@  diff_maps::insert_diff_node(const diff *dif,
     get_union_diff_map()[n] = const_cast<union_diff*>(d);
   else if (const typedef_diff *d = is_typedef_diff(dif))
     get_typedef_diff_map()[n] = const_cast<typedef_diff*>(d);
+  else if (const subrange_diff *d = is_subrange_diff(dif))
+    get_subrange_diff_map()[n] = const_cast<subrange_diff*>(d);
   else if (const array_diff *d = is_array_diff(dif))
       get_array_diff_map()[n] = const_cast<array_diff*>(d);
   else if (const reference_diff *d = is_reference_diff(dif))
@@ -9899,6 +10064,8 @@  corpus_diff::priv::count_leaf_type_changes(size_t &num_changes,
     num_changes, num_filtered);
   do_count_diff_map_changes(leaf_diffs_.get_typedef_diff_map(),
     num_changes, num_filtered);
+  do_count_diff_map_changes(leaf_diffs_.get_subrange_diff_map(),
+			    num_changes, num_filtered);
   do_count_diff_map_changes(leaf_diffs_.get_array_diff_map(),
     num_changes, num_filtered);
   do_count_diff_map_changes(leaf_diffs_.get_distinct_diff_map(),
diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc
index 38b89e62..31832c3f 100644
--- a/src/abg-default-reporter.cc
+++ b/src/abg-default-reporter.cc
@@ -652,6 +652,28 @@  default_reporter::report(const function_type_diff& d, ostream& out,
     report_local_function_type_changes(d, out, indent);
 }
 
+/// Report about the change carried by a @ref subrange_diff diff node
+/// in a serialized form.
+///
+/// @param d the diff node to consider.
+///
+/// @param out the output stream to report to.
+///
+/// @param indent the indentation string to use in the report.
+void
+default_reporter::report(const subrange_diff& d, std::ostream& out,
+			 const std::string& indent) const
+{
+  if (!diff_to_be_reported(&d))
+    return;
+
+  RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER3(d.first_subrange(),
+						    d.second_subrange(),
+						    "range type");
+
+  represent(d, d.context(), out,indent, /*local_only=*/false);
+}
+
 /// Report a @ref array_diff in a serialized form.
 ///
 /// @param d the @ref array_diff to consider.
diff --git a/src/abg-ir.cc b/src/abg-ir.cc
index a5b8e90a..e0d4f327 100644
--- a/src/abg-ir.cc
+++ b/src/abg-ir.cc
@@ -8641,7 +8641,9 @@  get_type_name(const type_base_sptr& t, bool qualified, bool internal)
 static bool
 has_generic_anonymous_internal_type_name(const decl_base *d)
 {
-  return is_class_or_union_type(d) || is_enum_type(d);
+  return (is_class_or_union_type(d)
+	  || is_enum_type(d)
+	  || is_subrange_type(d));
 }
 
 /// Return the generic internal name of an anonymous type.
@@ -8671,6 +8673,9 @@  get_generic_anonymous_internal_type_name(const decl_base *d)
   else if (is_enum_type(d))
     result =
       env.intern(tools_utils::get_anonymous_enum_internal_name_prefix());
+  else if (is_subrange_type(d))
+    result =
+      env.intern(tools_utils::get_anonymous_subrange_internal_name_prefix());
   else
     ABG_ASSERT_NOT_REACHED;
 
diff --git a/src/abg-leaf-reporter.cc b/src/abg-leaf-reporter.cc
index 7d363746..2006d4ff 100644
--- a/src/abg-leaf-reporter.cc
+++ b/src/abg-leaf-reporter.cc
@@ -140,6 +140,9 @@  report_type_changes_from_diff_maps(const leaf_reporter& reporter,
   // typedefs
   report_diffs(reporter, maps.get_typedef_diff_map(), out, indent);
 
+  // subranges
+  report_diffs(reporter, maps.get_subrange_diff_map(), out, indent);
+
   // arrays
   report_diffs(reporter, maps.get_array_diff_map(), out, indent);
 
@@ -430,6 +433,30 @@  leaf_reporter::report(const scope_diff& d,
     out << "\n";
 }
 
+/// Report about the change carried by a @ref subrange_diff diff node
+/// in a serialized form.
+///
+/// @param d the diff node to consider.
+///
+/// @param out the output stream to report to.
+///
+/// @param indent the indentation string to use in the report.
+void
+leaf_reporter::report(const subrange_diff& d, std::ostream& out,
+		      const std::string& indent) const
+{
+  if (!diff_to_be_reported(&d))
+    return;
+
+  RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER3(d.first_subrange(),
+						    d.second_subrange(),
+						    "range type");
+
+  represent(d, d.context(), out,indent, /*local_only=*/true);
+
+  maybe_report_interfaces_impacted_by_diff(&d, out, indent);
+}
+
 /// Report the changes carried by a @ref array_diff node.
 ///
 /// @param out the output stream to report to.
diff --git a/src/abg-reader.cc b/src/abg-reader.cc
index b93cce3a..4c2ff529 100644
--- a/src/abg-reader.cc
+++ b/src/abg-reader.cc
@@ -1377,7 +1377,7 @@  static shared_ptr<function_type>
 build_function_type(reader&, const xmlNodePtr, bool);
 
 static array_type_def::subrange_sptr
-build_subrange_type(reader&, const xmlNodePtr);
+build_subrange_type(reader&, const xmlNodePtr, bool);
 
 static array_type_def_sptr
 build_array_type_def(reader&, const xmlNodePtr, bool);
@@ -4109,8 +4109,9 @@  build_function_type(reader&	rdr,
 /// @return a pointer to a newly built array_type_def::subrange_type
 /// upon successful completion, a null pointer otherwise.
 static array_type_def::subrange_sptr
-build_subrange_type(reader&	rdr,
-		    const xmlNodePtr	node)
+build_subrange_type(reader&		rdr,
+		    const xmlNodePtr	node,
+		    bool		add_to_current_scope)
 {
   array_type_def::subrange_sptr nil;
 
@@ -4209,6 +4210,9 @@  build_subrange_type(reader&	rdr,
   maybe_set_artificial_location(rdr, node, p);
   p->is_infinite(is_infinite);
 
+  if (rdr.push_and_key_type_decl(p, id, add_to_current_scope))
+    rdr.map_xml_node_to_decl(node, p);
+
   return p;
 }
 
@@ -4307,7 +4311,7 @@  build_array_type_def(reader&	rdr,
     if (xmlStrEqual(n->name, BAD_CAST("subrange")))
       {
 	if (array_type_def::subrange_sptr s =
-	    build_subrange_type(rdr, n))
+	    build_subrange_type(rdr, n, /*add_to_current_scope=*/true))
 	  {
 	    MAYBE_MAP_TYPE_WITH_TYPE_ID(s, n);
 	    if (add_to_current_scope)
@@ -5818,6 +5822,7 @@  build_type(reader&	rdr,
    || (t = build_reference_type_def(rdr, node , add_to_current_scope))
    || (t = build_function_type(rdr, node, add_to_current_scope))
    || (t = build_array_type_def(rdr, node, add_to_current_scope))
+   || (t = build_subrange_type(rdr, node, add_to_current_scope))
    || (t = build_enum_type_decl_if_not_suppressed(rdr, node,
 						  add_to_current_scope))
    || (t = build_typedef_decl(rdr, node, add_to_current_scope))
diff --git a/src/abg-reporter-priv.cc b/src/abg-reporter-priv.cc
index a9fed571..63a45b80 100644
--- a/src/abg-reporter-priv.cc
+++ b/src/abg-reporter-priv.cc
@@ -712,6 +712,77 @@  represent(const var_diff_sptr	&diff,
     out << "\n";
 }
 
+/// Represent the changes carried by an instance of @ref subrange_diff
+/// that represent a difference between two ranges.
+///
+/// @param diff diff the diff node to represent.
+///
+/// @param ctxt the diff context to use.
+///
+/// @param local_only if true, only display local changes.
+///
+/// @param out the output stream to send the representation to.
+///
+/// @param indent the indentation string to use for the change report.
+void
+represent(const subrange_diff&		d,
+	  const diff_context_sptr	ctxt,
+	  ostream&			out,
+	  const string&		indent,
+	  bool				local_only)
+{
+  array_type_def::subrange_sptr o = d.first_subrange();
+  array_type_def::subrange_sptr n = d.second_subrange();
+  string oor = o->get_pretty_representation();
+  string nr = n->get_pretty_representation();
+  string on = o->get_name();
+  string nn = n->get_name();
+  int64_t olb = o->get_lower_bound();
+  int64_t nlb = n->get_lower_bound();
+  int64_t oub = o->get_upper_bound();
+  int64_t nub = n->get_upper_bound();
+
+    if (on != nn)
+    {
+      out << indent << "name of range changed from '"
+	  << on << "' to '" << nn << "'\n";
+    }
+
+  if (olb != nlb)
+    {
+      out << indent << "lower bound of range '"
+	  << on
+	  << "' change from '";
+      emit_num_value(olb, *ctxt, out);
+      out << "' to '";
+      emit_num_value(nlb, *ctxt, out);
+      out << "'\n";
+    }
+
+  if (oub != nub)
+    {
+      out << indent << "upper bound of range '"
+	  << on
+	  << "' change from '";
+      emit_num_value(oub, *ctxt, out);
+      out << "' to '";
+      emit_num_value(nub, *ctxt, out);
+      out << "'\n";
+    }
+
+  if (!local_only)
+    {
+      diff_sptr dif = d.underlying_type_diff();
+      if (dif && dif->to_be_reported())
+	{
+	  // report range underlying type changes
+	  out << indent << "underlying type of range '"
+	      << oor << "' changed:\n";
+	  dif->report(out, indent + "  ");
+	}
+    }
+}
+
 /// Report the size and alignment changes of a type.
 ///
 /// @param first the first type to consider.
diff --git a/src/abg-reporter-priv.h b/src/abg-reporter-priv.h
index 884477d0..472d1fb9 100644
--- a/src/abg-reporter-priv.h
+++ b/src/abg-reporter-priv.h
@@ -156,6 +156,13 @@  represent(const var_diff_sptr	&diff,
 	  const string&	indent = "",
 	  bool			local_only = false);
 
+void
+represent(const subrange_diff&		diff,
+	  const diff_context_sptr	ctxt,
+	  ostream&			out,
+	  const string&		indent = "",
+	  bool				local_only = false);
+
 void
 report_size_and_alignment_changes(type_or_decl_base_sptr	first,
 				  type_or_decl_base_sptr	second,
diff --git a/src/abg-tools-utils.cc b/src/abg-tools-utils.cc
index 119e5f58..03cb88f9 100644
--- a/src/abg-tools-utils.cc
+++ b/src/abg-tools-utils.cc
@@ -559,9 +559,10 @@  is_dir(const string& path)
   return false;
 }
 
-static const char* ANONYMOUS_STRUCT_INTERNAL_NAME = "__anonymous_struct__";
-static const char* ANONYMOUS_UNION_INTERNAL_NAME =  "__anonymous_union__";
-static const char* ANONYMOUS_ENUM_INTERNAL_NAME =   "__anonymous_enum__";
+static const char* ANONYMOUS_STRUCT_INTERNAL_NAME =   "__anonymous_struct__";
+static const char* ANONYMOUS_UNION_INTERNAL_NAME =    "__anonymous_union__";
+static const char* ANONYMOUS_ENUM_INTERNAL_NAME =     "__anonymous_enum__";
+static const char* ANONYMOUS_SUBRANGE_INTERNAL_NAME = "__anonymous_range__";
 
 static int ANONYMOUS_STRUCT_INTERNAL_NAME_LEN =
   strlen(ANONYMOUS_STRUCT_INTERNAL_NAME);
@@ -586,6 +587,9 @@  const char*
 get_anonymous_union_internal_name_prefix()
 {return ANONYMOUS_UNION_INTERNAL_NAME;}
 
+static int ANONYMOUS_SUBRANGE_INTERNAL_NAME_LEN =
+  strlen(ANONYMOUS_SUBRANGE_INTERNAL_NAME);
+
 /// Getter of the prefix for the name of anonymous enums.
 ///
 /// @reaturn the prefix for the name of anonymous enums.
@@ -593,6 +597,13 @@  const char*
 get_anonymous_enum_internal_name_prefix()
 {return ANONYMOUS_ENUM_INTERNAL_NAME;}
 
+/// Getter of the prefix for the name of anonymous range.
+///
+/// @reaturn the prefix for the name of anonymous range.
+const char*
+get_anonymous_subrange_internal_name_prefix()
+{return ANONYMOUS_SUBRANGE_INTERNAL_NAME;}
+
 /// Compare two fully qualified decl names by taking into account that
 /// they might have compontents that are anonymous types/namespace names.
 ///
diff --git a/src/abg-writer.cc b/src/abg-writer.cc
index 9fe3dec7..bd3f8db7 100644
--- a/src/abg-writer.cc
+++ b/src/abg-writer.cc
@@ -921,6 +921,9 @@  static bool write_reference_type_def(const reference_type_def_sptr&,
 				     write_context&, unsigned);
 static bool write_array_type_def(const array_type_def_sptr&,
 			         write_context&, unsigned);
+static bool write_array_subrange_type(const array_type_def::subrange_sptr&,
+				      write_context&,
+				      unsigned);
 static bool write_enum_type_decl(const enum_type_decl_sptr&,
 				 write_context&, unsigned);
 static bool write_typedef_decl(const typedef_decl_sptr&,
@@ -1969,6 +1972,9 @@  write_decl(const decl_base_sptr& decl, write_context& ctxt, unsigned indent)
 				  <reference_type_def>(decl), ctxt, indent)
       || write_array_type_def(dynamic_pointer_cast
 			      <array_type_def>(decl), ctxt, indent)
+      || write_array_subrange_type(dynamic_pointer_cast
+				   <array_type_def::subrange_type>(decl),
+				   ctxt, indent)
       || write_enum_type_decl(dynamic_pointer_cast<enum_type_decl>(decl),
 			      ctxt, indent)
       || write_typedef_decl(dynamic_pointer_cast<typedef_decl>(decl),
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index f2d0c0ca..c91c24fb 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -298,6 +298,14 @@  test-abidiff-exit/test-allow-type-region-v5.c \
 test-abidiff-exit/test-allow-type-region-v5.o \
 test-abidiff-exit/test-allow-type-suppr2.txt \
 test-abidiff-exit/test-allow-type-suppr1.txt \
+test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-1.txt \
+test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-2.txt \
+test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.adb \
+test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.ads \
+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-diff-dwarf/test0-v0.cc		\
 test-diff-dwarf/test0-v0.o			\
diff --git a/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-1.txt b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-1.txt
new file mode 100644
index 00000000..1233215e
--- /dev/null
+++ b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-1.txt
@@ -0,0 +1,15 @@ 
+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 test1__my_int[6] test1__first_function()' at test1.adb:6:1 has some indirect sub-type changes:
+    return type changed:
+      type name changed from 'test1__my_int[6]' to 'test1__my_int[7]'
+      array type size changed from 6000 to 7000
+      array type subrange 1 changed length from 6 to 7
+
+  [C] 'function test1__my_index test1__second_function()' at test1.adb:14:1 has some indirect sub-type changes:
+    return type changed:
+      upper bound of range 'test1__my_index' change from '5' to '6'
+
diff --git a/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-2.txt b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-2.txt
new file mode 100644
index 00000000..30d7488d
--- /dev/null
+++ b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-2.txt
@@ -0,0 +1,19 @@ 
+Leaf changes summary: 3 artifacts changed
+Changed leaf types summary: 1 leaf type 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 test1__my_int[6] test1__first_function()' at test1.adb:6:1 has some sub-type changes:
+    return type changed:
+      type name changed from 'test1__my_int[6]' to 'test1__my_int[7]'
+      array type size changed from 6000 to 7000
+      array type subrange 1 changed length from 6 to 7
+
+  [C] 'function test1__my_index test1__second_function()' at test1.adb:14:1 has some sub-type changes:
+    return type changed:
+      upper bound of range 'test1__my_index' change from '5' to '6'
+
+'<range test1__my_index>[6]' changed:
+  upper bound of range 'test1__my_index' change from '5' to '6'
diff --git a/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.adb b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.adb
new file mode 100644
index 00000000..864ff961
--- /dev/null
+++ b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.adb
@@ -0,0 +1,19 @@ 
+-- Compile this file with:
+--   gcc -g -c test1.adb
+
+package body Test1 is
+
+function First_Function return My_Int_Array is
+  A : My_Int_Array;
+begin
+  A := (1,2,3,4,5,6);
+  return A;
+end First_Function;
+
+
+function Second_Function return My_Index is
+begin
+  return My_Index'Last;
+end Second_Function;
+
+end Test1;
diff --git a/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.ads b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.ads
new file mode 100644
index 00000000..bda041a1
--- /dev/null
+++ b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.ads
@@ -0,0 +1,11 @@ 
+package Test1 is
+
+type My_Int is range 0 .. 1000;
+type My_Index is range 0 .. 5;
+type My_Int_Array is array (My_Index) of My_Int;
+
+function First_Function return My_Int_Array;
+
+function Second_Function return My_Index;
+
+end Test1;
\ No newline at end of file
diff --git a/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.o b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.o
new file mode 100644
index 0000000000000000000000000000000000000000..28a539c8240725c914b5314cce7d910576464796
GIT binary patch
literal 3792
zcmcgv-D_M$6rb6fn{3@?-89v<M#v^sZHs$%^FgtxX*UVmZm`u7tX~+ncXRJ<wq|$3
z-MclZh=L$40g2#)4?c<rKKLa1;DZoQ5&wuFRe}%FLLUMa^!(<|?A}aP6dyb=bI$pl
zbLPyPJ7<=CD|hKagmb2dvvaJYDU`9z106Xl#4LM&9cEYatzYu3-F)j#zV&0imAjp9
zUEN*W+5}$uKDW&o%|Ayl-!d@&+Jkw=#Qa+?%WveiDeUe>Zl{&IN7~(u%lBxh#VxGx
zwMnTKw`lsDhRJvosSQm1n8M_S6u#33?F@}b1QN$WY@S9$oUR9|MZ=+C0;kn`!FZgX
z2bUC+oPR7<<h}e^Wg<S?wnlBn`wZA3A6%hTM%d^GOZOY``9Xq?vsmohh-t(pkJ0uA
z_@nW`m@zywJirh2C5|xG!#O-T`I;kaesHuuP3P;i*!g2dd@6P}b|yAI2<Pn4o3uio
z#k(7#lgx-J|Hx6=%@f#>*rh0)kT8X-)dop;nTE-t>=bd%`5*CqFw~3&3B#g%5k4Hb
zKUkJ56v5enwtB=gFPlc>_@HS<n<gJKjZ3Ea5`72GeYfF{6$+(_*YFFaW^Ku@)N4$l
z&sEn8m6|`RbfG%#n$iP10ed}sWe>s&w&&UF?BX+5lQWK;9GkE*)>v{pGd_`-7@tg@
zSa6+W-u9&-l{uMAm6NHe->kXQWw+*fl_gSbZ)tgY?a9-r)01lXhPza+Iohr*+bOd2
za=q%Now{?qk}g;L^h%{@7b|7EvXX8zi=JI8yNy(%xw=~S{4@^RNISM~3o%8WPNh^z
zxoZ?@J2p86A;LVC+5_Fl{J+V>ml0>|NbKU=+*I-e75L=8sIIskG@;>=G|-0>N_Ucf
zE1HmW5SO~RUZfuuDB(937+*{9p@V(VO)@@AI0lFshq0M>;@!wxfA0c0kP6#Vz==e6
zD*Kxq`zwK&iQZQB3xQpl_A%_Mhu!&epMd}az0rjXaq9gBBY0`{84MPBWJ6XX*l7p}
zM1vjNhv7_zLi-UlBJ2@~<4pjG+7QPR34ioGNWFLThOq(pasY34cjqDqsZfw@8}!}m
z{1w$N-J85?7Zq~!;skUbvGBc6&pdFv&({Mt+H*j_#mg-92Q?ga&_e+em1&=auu~F;
zpZJZC`dA1@-n`V$YPiZbqv4N9{b>z9Ep^lvguGb)c_>8cT~_#)0nAn<$4$fj)%SWw
z;>usD?0qRHfA!sw3j}}hJ1R8B5|S%_sj^Wiz#nyfUF!H<0V(`ept5k?;QzbCRo&G3
zYClP7$C<+4C9C1e|C)xYIxwrTUiIxFao-F0vXXpv&1V*#TxJy;4Q6@nifuV=v00`c
zoKl@^Lbi)V&%Lq7YzMFR9&Dvjb5#hXP$J-h(3k4fs#~L!wYu+G^xCBwzP<FC)XTM|
zwd&PZUC&>a>$=N@l4n=dx0gr!Pi%;yP-FF-)goCb=sChQhsy{J#E0(&@J}%j>HfO@
zIQgKL_4v;a+=Y-UOt?Qf2D^&?BJAA77xxnHN0vsI-jfAcmW$*4fFJe>Quk|`<Zk(2
zkYG!AcP8BzeXV2g-j-md6DlO#7w<*4{oj_4oQlW(0qOg92-DXjh$ZBQdKF5Dbl(Em
zy5&#GMAu|2^5fS^&%a6-)>Qi>QBY0h|49LotNe<;L3p?LDS4rG{~><kZ{o*sD57-0
z+Ox{5_=jXsa@&anTgHbm$hz+*gyFmBeX%U#^}49~VJ*-%G_a-~|B;MegHwp~_^-$Y
z*KEiK;@i?OFL8Xo1Pv9h?ti!32ua8v$D}+k{ZkRKdOYrg-usBp$o_i~N{ICO4Unx{
O{0}nGccEB_di-B|e~zpG

literal 0
HcmV?d00001

diff --git a/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.adb b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.adb
--- /dev/null
+++ b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.adb
@@ -0,0 +1,19 @@ 
+-- Compile this file with:
+--   gcc -g -c test1.adb
+
+package body Test1 is
+
+function First_Function return My_Int_Array is
+  A : My_Int_Array;
+begin
+  A := (1,2,3,4,5,6,7);
+  return A;
+end First_Function;
+
+
+function Second_Function return My_Index is
+begin
+  return My_Index'Last;
+end Second_Function;
+
+end Test1;
diff --git a/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.ads b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.ads
new file mode 100644
index 00000000..2ec09b2a
--- /dev/null
+++ b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.ads
@@ -0,0 +1,11 @@ 
+package Test1 is
+
+type My_Int is range 0 .. 1000;
+type My_Index is range 0 .. 6;
+type My_Int_Array is array (My_Index) of My_Int;
+
+function First_Function return My_Int_Array;
+
+function Second_Function return My_Index;
+
+end Test1;
diff --git a/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.o b/tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.o
new file mode 100644
index 0000000000000000000000000000000000000000..fa2f2f5e9197d9ebea244424db2a5e448c2a877f
GIT binary patch
literal 3824
zcmcgv-ESL35Z}Ga<pVd4(-hhgq&VfPt?=1yql&hqbz7yqh!(0s5U8!(bMEZ8#CCK(
zw@G<G0u^CZf+F$A0}nhP@c=I<ec*wr5+H>58wx5_g%F~BiU0vKdo#{uV+7)XiFRk^
zH#57lbGu{Z)v4o04Jiea6bHnr#;6dV46MopB^Jc}Vw0G0+CMn$6{mgIX@Bjsr+#tT
zGb?9rTt&S6<<w0nVE*2~`Id?E?H-)(SUCUKi}O!?!nrba6N2vnzYTl^_`RX!6Tc2E
zw|;l7-%dFL--7ywbN#!tGk`nM4%d1im9sZs`Ur+4WIv{6;xvd;oG!-{d8ZGxy)X;|
zC5a1(X&8n&eGjTO3=f8dxafsHAeod0krO3|%lFiZvR6LKCg5(z+V2Y4XQIt`=OnB$
zF1C$}?4X&P9s%ePkw_dEx6I_kR!DzXKAId!m}8@3!*XL^YO@eMQlh5>Uu#@Uk8B&v
z!ufh_ad4}d+?Uv&*qfLhLFdAjORz$pExQ}~CxqG0{>B!_<_XM5WvNQ1B%I>a>VP1e
zhGB_*u@ktI^0(w5GOQU45XMyb3^`^DMazN(BBU7TsGBY8gk>5#M=Z<8k67}cWgfSz
zm*7K48T!pIUo4iZK{G6tTlLwn+NcXcpRX+ytM%|O>q_<fMb;xb0Bb!$wnyPbHwfG%
zaqO9y^dZkp=XcvVJD=W_+qFBld)GvI`zhZ`J8npZOm0UyQ%PrPVXN*>R{XjjRA)hT
zgW0*s#V7Y<_Dt~dO@Fpg_q42S*DHzaT%+b^y@q$bnypmB?0mK4mZ}xEI-hN}N`YIi
z_{~hSwXo0#!Ym%Pnf2VzRbmD_y=u9f@fRV|^;~d_LX<h5Sp!|j|G%55FQd-5Dv4u9
zj_gZshXU{T7u8kw18z9*G~N^#5D9luey$!N=tz=ub-h5}q)@;wof2{}B}X^(^<M?!
zLxAHzf`=o-p=9a}<H%s|DR2N4ZBHQ%<l@A3<BW1Z`x(T6)Z1qJ(I`H$te-Kj9&z{2
z^%m?$ob_6(sZPBXL(Pmj%{qfAVof+^HKR;pNF<tK!#WJlv@w>Csu5rh6OKIrN!128
zwn+59gdh<2JLq9zm^ugIo!7m350q3a(yNW0-Qnqz{9L-f@ve`kI0YRiqWgfw?*+Gc
z#IZl0kK7>Vh!9tune+!V9PLOCMod+va~8mM5{`a&H<|JzAddSwr0>^o-tUlxKSuh~
z8oq~gtS=I;|3ah+pE%>6lD<G3ZyM&$-|Kb4*`HML776Un-(CI2feroD?<o1DG=EaX
zHWJVu>wJ-P{9Qp}{8prjc-_$dXTrH|dOm5g<C)^$rJ&)Q|2YlkItaVDR14h_@Gyw@
z9800U7z!IZuCPnZrmzEl-nBiy)T+SmO}PO!CA+0k;9po{cBAIK2Ai+eeGY*wSVXv}
z^w~zO=GS4%dL#60=ysWA=+3@OdZpg77lOuuAB0P^u0K~S2X2kOJst5su~CS^8uNGN
zMG7QbW`KCS<_L|$!1(yxK>Q1wfOLOde;j=9E$i`LVQ?41z2b!TN5|04@gK*XyZGY0
z#Qsr$5vLESAak@h_7C*KT#@*GO@iEQ|BD2+mG|nT`{KLSG38B#%B_YfN%zHm(JlWJ
zCCc%bKfW(Le-AKyO@Ks>_AjCmBi$G6-S#igM&~FN_s3r=eg6f(a81q=L`84Y{@*Y_
zocCw`3gF%1Pt%23`G@!`e-r;49ttQMvCho<GJh8=EO(qhc#Y!Y7|Ocu2Y}&sq2r>9
zqBkjCuM5|Y{XPQ$*VN;$QT!r164&FG0Y}#Y*_pjhjt&9%{ZcSEp6`FRy)h(5KaOcS
oF#M;YV)b~u6Z+f7_>=VhUPL8Edi{pM)-C=HZNz<um(b(?0uZO3dH?_b

literal 0
HcmV?d00001

diff --git a/tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi b/tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi
--- a/tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi
+++ b/tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-variable-symbols>
     <!-- signed char -->
     <elf-symbol name='a' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-annotate/libtest23.so.abi b/tests/data/test-annotate/libtest23.so.abi
index ef998af9..742bce37 100644
--- a/tests/data/test-annotate/libtest23.so.abi
+++ b/tests/data/test-annotate/libtest23.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-annotate/libtest24-drop-fns-2.so.abi b/tests/data/test-annotate/libtest24-drop-fns-2.so.abi
index 919e06d3..5cd5a8e6 100644
--- a/tests/data/test-annotate/libtest24-drop-fns-2.so.abi
+++ b/tests/data/test-annotate/libtest24-drop-fns-2.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libgcc_s.so.1'/>
     <dependency name='libc.so.6'/>
diff --git a/tests/data/test-annotate/libtest24-drop-fns.so.abi b/tests/data/test-annotate/libtest24-drop-fns.so.abi
index 919e06d3..5cd5a8e6 100644
--- a/tests/data/test-annotate/libtest24-drop-fns.so.abi
+++ b/tests/data/test-annotate/libtest24-drop-fns.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libgcc_s.so.1'/>
     <dependency name='libc.so.6'/>
diff --git a/tests/data/test-annotate/test-anonymous-members-0.o.abi b/tests/data/test-annotate/test-anonymous-members-0.o.abi
index d0499f63..89fb5956 100644
--- a/tests/data/test-annotate/test-anonymous-members-0.o.abi
+++ b/tests/data/test-annotate/test-anonymous-members-0.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-function-symbols>
     <!-- foo(S&) -->
     <elf-symbol name='_Z3fooR1S' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-annotate/test0.abi b/tests/data/test-annotate/test0.abi
index 1e4c2415..23e8098e 100644
--- a/tests/data/test-annotate/test0.abi
+++ b/tests/data/test-annotate/test0.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-annotate/test1.abi b/tests/data/test-annotate/test1.abi
index d6740e93..311c6eb2 100644
--- a/tests/data/test-annotate/test1.abi
+++ b/tests/data/test-annotate/test1.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-annotate/test13-pr18894.so.abi b/tests/data/test-annotate/test13-pr18894.so.abi
index 23be514a..2d8ae965 100644
--- a/tests/data/test-annotate/test13-pr18894.so.abi
+++ b/tests/data/test-annotate/test13-pr18894.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libdbus-1.so.3'>
+<abi-corpus version='2.2' soname='libdbus-1.so.3'>
   <elf-needed>
     <dependency name='librt.so.1'/>
     <dependency name='libpthread.so.0'/>
diff --git a/tests/data/test-annotate/test14-pr18893.so.abi b/tests/data/test-annotate/test14-pr18893.so.abi
index 08f9024f..10613f41 100644
--- a/tests/data/test-annotate/test14-pr18893.so.abi
+++ b/tests/data/test-annotate/test14-pr18893.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libGLU.so.1'>
+<abi-corpus version='2.2' soname='libGLU.so.1'>
   <elf-needed>
     <dependency name='libGL.so.1'/>
     <dependency name='libstdc++.so.6'/>
diff --git a/tests/data/test-annotate/test15-pr18892.so.abi b/tests/data/test-annotate/test15-pr18892.so.abi
index 57e72a5a..f14d6c3d 100644
--- a/tests/data/test-annotate/test15-pr18892.so.abi
+++ b/tests/data/test-annotate/test15-pr18892.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libtsan.so.0'>
+<abi-corpus version='2.2' soname='libtsan.so.0'>
   <elf-needed>
     <dependency name='librt.so.1'/>
     <dependency name='libpthread.so.0'/>
diff --git a/tests/data/test-annotate/test17-pr19027.so.abi b/tests/data/test-annotate/test17-pr19027.so.abi
index a8f1a2ef..8a88ef0e 100644
--- a/tests/data/test-annotate/test17-pr19027.so.abi
+++ b/tests/data/test-annotate/test17-pr19027.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libharfbuzz.so.0'>
+<abi-corpus version='2.2' soname='libharfbuzz.so.0'>
   <elf-needed>
     <dependency name='libglib-2.0.so.0'/>
     <dependency name='libfreetype.so.6'/>
diff --git a/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi b/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi
index 5ea48bd3..d279ce6e 100644
--- a/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi
+++ b/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libvtkRenderingLIC-6.1.so.1'>
+<abi-corpus version='2.2' soname='libvtkRenderingLIC-6.1.so.1'>
   <elf-needed>
     <dependency name='libvtkIOLegacy-6.1.so.1'/>
     <dependency name='libvtkIOXML-6.1.so.1'/>
diff --git a/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi b/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
index 2b19b1de..970bd614 100644
--- a/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
+++ b/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libtcmalloc_and_profiler.so.4'>
+<abi-corpus version='2.2' soname='libtcmalloc_and_profiler.so.4'>
   <elf-needed>
     <dependency name='libunwind.so.8'/>
     <dependency name='libpthread.so.0'/>
diff --git a/tests/data/test-annotate/test2.so.abi b/tests/data/test-annotate/test2.so.abi
index 039f67b1..40cba346 100644
--- a/tests/data/test-annotate/test2.so.abi
+++ b/tests/data/test-annotate/test2.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi b/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi
index 67058866..13a511f1 100644
--- a/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi
+++ b/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libvtkParallelCore-6.1.so.1'>
+<abi-corpus version='2.2' soname='libvtkParallelCore-6.1.so.1'>
   <elf-needed>
     <dependency name='libvtkIOLegacy-6.1.so.1'/>
     <dependency name='libvtkIOCore-6.1.so.1'/>
diff --git a/tests/data/test-annotate/test21-pr19092.so.abi b/tests/data/test-annotate/test21-pr19092.so.abi
index 4868ed77..ddf2d32f 100644
--- a/tests/data/test-annotate/test21-pr19092.so.abi
+++ b/tests/data/test-annotate/test21-pr19092.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-annotate/test3.so.abi b/tests/data/test-annotate/test3.so.abi
index 3da43791..3153db54 100644
--- a/tests/data/test-annotate/test3.so.abi
+++ b/tests/data/test-annotate/test3.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='test3.so.1'>
+<abi-corpus version='2.2' soname='test3.so.1'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-annotate/test4.so.abi b/tests/data/test-annotate/test4.so.abi
index 2e7a47f4..b478fe5c 100644
--- a/tests/data/test-annotate/test4.so.abi
+++ b/tests/data/test-annotate/test4.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-annotate/test5.o.abi b/tests/data/test-annotate/test5.o.abi
index 38655f74..4674be7c 100644
--- a/tests/data/test-annotate/test5.o.abi
+++ b/tests/data/test-annotate/test5.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-function-symbols>
     <!-- bar(void*) -->
     <elf-symbol name='_Z3barPv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-annotate/test6.so.abi b/tests/data/test-annotate/test6.so.abi
index aa22f841..a313c769 100644
--- a/tests/data/test-annotate/test6.so.abi
+++ b/tests/data/test-annotate/test6.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-annotate/test7.so.abi b/tests/data/test-annotate/test7.so.abi
index f85708ae..85062a82 100644
--- a/tests/data/test-annotate/test7.so.abi
+++ b/tests/data/test-annotate/test7.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-function-symbols>
     <!-- foo(S&) -->
     <elf-symbol name='_Z3fooR1S' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-annotate/test8-qualified-this-pointer.so.abi b/tests/data/test-annotate/test8-qualified-this-pointer.so.abi
index 117451c4..b17505f8 100644
--- a/tests/data/test-annotate/test8-qualified-this-pointer.so.abi
+++ b/tests/data/test-annotate/test8-qualified-this-pointer.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-btf/test0.o.abi b/tests/data/test-read-btf/test0.o.abi
index 165beaee..3323f053 100644
--- a/tests/data/test-read-btf/test0.o.abi
+++ b/tests/data/test-read-btf/test0.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-btf/test0.o'>
+<abi-corpus version='2.2' path='data/test-read-btf/test0.o'>
   <elf-function-symbols>
     <elf-symbol name='fn0' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-btf/test1.o.abi b/tests/data/test-read-btf/test1.o.abi
index 273039ba..200388e7 100644
--- a/tests/data/test-read-btf/test1.o.abi
+++ b/tests/data/test-read-btf/test1.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-btf/test1.o'>
+<abi-corpus version='2.2' path='data/test-read-btf/test1.o'>
   <elf-function-symbols>
     <elf-symbol name='fn0' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-ctf/PR27700/test-PR27700.abi b/tests/data/test-read-ctf/PR27700/test-PR27700.abi
index 1a7c229e..7ce82097 100644
--- a/tests/data/test-read-ctf/PR27700/test-PR27700.abi
+++ b/tests/data/test-read-ctf/PR27700/test-PR27700.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-common/PR27700/test-PR27700.o'>
+<abi-corpus version='2.2' path='data/test-read-common/PR27700/test-PR27700.o'>
   <elf-function-symbols>
     <elf-symbol name='foo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-ctf/test-PR26568-1.o.abi b/tests/data/test-read-ctf/test-PR26568-1.o.abi
index 60017457..378ef14a 100644
--- a/tests/data/test-read-ctf/test-PR26568-1.o.abi
+++ b/tests/data/test-read-ctf/test-PR26568-1.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-common/test-PR26568-1.o'>
+<abi-corpus version='2.2' path='data/test-read-common/test-PR26568-1.o'>
   <elf-function-symbols>
     <elf-symbol name='fun' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-ctf/test-PR26568-2.o.abi b/tests/data/test-read-ctf/test-PR26568-2.o.abi
index d038316a..5163c2ee 100644
--- a/tests/data/test-read-ctf/test-PR26568-2.o.abi
+++ b/tests/data/test-read-ctf/test-PR26568-2.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-common/test-PR26568-2.o'>
+<abi-corpus version='2.2' path='data/test-read-common/test-PR26568-2.o'>
   <elf-function-symbols>
     <elf-symbol name='fun' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-ctf/test-alias.o.abi b/tests/data/test-read-ctf/test-alias.o.abi
index 0122abc6..cec8a2c6 100644
--- a/tests/data/test-read-ctf/test-alias.o.abi
+++ b/tests/data/test-read-ctf/test-alias.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-alias.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-alias.o'>
   <elf-function-symbols>
     <elf-symbol name='alias_func' type='func-type' binding='weak-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='main_func' type='func-type' binding='global-binding' visibility='default-visibility' alias='alias_func' is-defined='yes'/>
diff --git a/tests/data/test-read-ctf/test-ambiguous-struct-A.o.hash.abi b/tests/data/test-read-ctf/test-ambiguous-struct-A.o.hash.abi
index 42ce36de..3d6a779e 100644
--- a/tests/data/test-read-ctf/test-ambiguous-struct-A.o.hash.abi
+++ b/tests/data/test-read-ctf/test-ambiguous-struct-A.o.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-ambiguous-struct-A.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-ambiguous-struct-A.o'>
   <elf-variable-symbols>
     <elf-symbol name='foo' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-variable-symbols>
diff --git a/tests/data/test-read-ctf/test-ambiguous-struct-B.o.hash.abi b/tests/data/test-read-ctf/test-ambiguous-struct-B.o.hash.abi
index 351483de..ba34d7a3 100644
--- a/tests/data/test-read-ctf/test-ambiguous-struct-B.o.hash.abi
+++ b/tests/data/test-read-ctf/test-ambiguous-struct-B.o.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-ambiguous-struct-B.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-ambiguous-struct-B.o'>
   <elf-variable-symbols>
     <elf-symbol name='a' size='24' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-variable-symbols>
diff --git a/tests/data/test-read-ctf/test-anonymous-fields.o.abi b/tests/data/test-read-ctf/test-anonymous-fields.o.abi
index 987daa57..34234d1f 100644
--- a/tests/data/test-read-ctf/test-anonymous-fields.o.abi
+++ b/tests/data/test-read-ctf/test-anonymous-fields.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-anonymous-fields.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-anonymous-fields.o'>
   <elf-variable-symbols>
     <elf-symbol name='t' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-variable-symbols>
diff --git a/tests/data/test-read-ctf/test-array-mdimension.abi b/tests/data/test-read-ctf/test-array-mdimension.abi
index 177284d2..b8aad7d5 100644
--- a/tests/data/test-read-ctf/test-array-mdimension.abi
+++ b/tests/data/test-read-ctf/test-array-mdimension.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-array-mdimension.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-array-mdimension.o'>
   <elf-variable-symbols>
     <elf-symbol name='a' size='120' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-variable-symbols>
diff --git a/tests/data/test-read-ctf/test-array-of-pointers.abi b/tests/data/test-read-ctf/test-array-of-pointers.abi
index c521bbec..38f65f1f 100644
--- a/tests/data/test-read-ctf/test-array-of-pointers.abi
+++ b/tests/data/test-read-ctf/test-array-of-pointers.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-array-of-pointers.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-array-of-pointers.o'>
   <elf-variable-symbols>
     <elf-symbol name='t' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-variable-symbols>
diff --git a/tests/data/test-read-ctf/test-array-size.abi b/tests/data/test-read-ctf/test-array-size.abi
index cd1bafe6..d0a654a9 100644
--- a/tests/data/test-read-ctf/test-array-size.abi
+++ b/tests/data/test-read-ctf/test-array-size.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-array-size.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-array-size.o'>
   <elf-variable-symbols>
     <elf-symbol name='bar' size='1' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='baz' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-read-ctf/test-bitfield-enum.abi b/tests/data/test-read-ctf/test-bitfield-enum.abi
index b95f1781..d1505469 100644
--- a/tests/data/test-read-ctf/test-bitfield-enum.abi
+++ b/tests/data/test-read-ctf/test-bitfield-enum.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-bitfield-enum.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-bitfield-enum.o'>
   <elf-variable-symbols>
     <elf-symbol name='e' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-variable-symbols>
diff --git a/tests/data/test-read-ctf/test-bitfield.abi b/tests/data/test-read-ctf/test-bitfield.abi
index 4231ba3e..7a28278e 100644
--- a/tests/data/test-read-ctf/test-bitfield.abi
+++ b/tests/data/test-read-ctf/test-bitfield.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-bitfield.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-bitfield.o'>
   <elf-variable-symbols>
     <elf-symbol name='f' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='fb' size='1' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-read-ctf/test-callback.abi b/tests/data/test-read-ctf/test-callback.abi
index 3c90e737..96ea10f0 100644
--- a/tests/data/test-read-ctf/test-callback.abi
+++ b/tests/data/test-read-ctf/test-callback.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-callback.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-callback.o'>
   <elf-function-symbols>
     <elf-symbol name='assign' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='f2' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-read-ctf/test-callback2.abi b/tests/data/test-read-ctf/test-callback2.abi
index 87b43d06..8f140e85 100644
--- a/tests/data/test-read-ctf/test-callback2.abi
+++ b/tests/data/test-read-ctf/test-callback2.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-callback2.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-callback2.o'>
   <elf-variable-symbols>
     <elf-symbol name='s0' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-variable-symbols>
diff --git a/tests/data/test-read-ctf/test-conflicting-type-syms-a.o.hash.abi b/tests/data/test-read-ctf/test-conflicting-type-syms-a.o.hash.abi
index 79079b04..0e9e5741 100644
--- a/tests/data/test-read-ctf/test-conflicting-type-syms-a.o.hash.abi
+++ b/tests/data/test-read-ctf/test-conflicting-type-syms-a.o.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-conflicting-type-syms-a.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-conflicting-type-syms-a.o'>
   <elf-variable-symbols>
     <elf-symbol name='a' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='ignore2' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-read-ctf/test-conflicting-type-syms-b.o.hash.abi b/tests/data/test-read-ctf/test-conflicting-type-syms-b.o.hash.abi
index 74b25d36..1722e93a 100644
--- a/tests/data/test-read-ctf/test-conflicting-type-syms-b.o.hash.abi
+++ b/tests/data/test-read-ctf/test-conflicting-type-syms-b.o.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-conflicting-type-syms-b.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-conflicting-type-syms-b.o'>
   <elf-variable-symbols>
     <elf-symbol name='b' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='ignore1' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-read-ctf/test-const-array.abi b/tests/data/test-read-ctf/test-const-array.abi
index bd60b098..36fbeccc 100644
--- a/tests/data/test-read-ctf/test-const-array.abi
+++ b/tests/data/test-read-ctf/test-const-array.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-const-array.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-const-array.o'>
   <elf-variable-symbols>
     <elf-symbol name='a' size='32' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-variable-symbols>
diff --git a/tests/data/test-read-ctf/test-dynamic-array.o.abi b/tests/data/test-read-ctf/test-dynamic-array.o.abi
index 4a919cae..52f601ea 100644
--- a/tests/data/test-read-ctf/test-dynamic-array.o.abi
+++ b/tests/data/test-read-ctf/test-dynamic-array.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-dynamic-array.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-dynamic-array.o'>
   <elf-function-symbols>
     <elf-symbol name='use_struct_s' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-ctf/test-enum-many.o.hash.abi b/tests/data/test-read-ctf/test-enum-many.o.hash.abi
index 9119525b..761d3469 100644
--- a/tests/data/test-read-ctf/test-enum-many.o.hash.abi
+++ b/tests/data/test-read-ctf/test-enum-many.o.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-enum-many.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-enum-many.o'>
   <elf-variable-symbols>
     <elf-symbol name='bar' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='foo' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-read-ctf/test-enum-symbol.o.hash.abi b/tests/data/test-read-ctf/test-enum-symbol.o.hash.abi
index da68828c..236f2399 100644
--- a/tests/data/test-read-ctf/test-enum-symbol.o.hash.abi
+++ b/tests/data/test-read-ctf/test-enum-symbol.o.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-enum-symbol.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-enum-symbol.o'>
   <elf-variable-symbols>
     <elf-symbol name='primary1' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-variable-symbols>
diff --git a/tests/data/test-read-ctf/test-enum.o.abi b/tests/data/test-read-ctf/test-enum.o.abi
index e13ebdd0..ca02fdf4 100644
--- a/tests/data/test-read-ctf/test-enum.o.abi
+++ b/tests/data/test-read-ctf/test-enum.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-enum.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-enum.o'>
   <elf-variable-symbols>
     <elf-symbol name='bar' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='foo' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-read-ctf/test-fallback.abi b/tests/data/test-read-ctf/test-fallback.abi
index 9f09cd56..1ed9508c 100644
--- a/tests/data/test-read-ctf/test-fallback.abi
+++ b/tests/data/test-read-ctf/test-fallback.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-fallback.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-fallback.o'>
   <elf-variable-symbols>
     <elf-symbol name='a' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-variable-symbols>
diff --git a/tests/data/test-read-ctf/test-forward-type-decl.abi b/tests/data/test-read-ctf/test-forward-type-decl.abi
index c239187b..46caf6a0 100644
--- a/tests/data/test-read-ctf/test-forward-type-decl.abi
+++ b/tests/data/test-read-ctf/test-forward-type-decl.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-forward-type-decl.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-forward-type-decl.o'>
   <elf-variable-symbols>
     <elf-symbol name='addr' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-variable-symbols>
diff --git a/tests/data/test-read-ctf/test-functions-declaration.abi b/tests/data/test-read-ctf/test-functions-declaration.abi
index 193221e4..84f50c39 100644
--- a/tests/data/test-read-ctf/test-functions-declaration.abi
+++ b/tests/data/test-read-ctf/test-functions-declaration.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-functions-declaration.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-functions-declaration.o'>
   <elf-function-symbols>
     <elf-symbol name='attribute_container_add_device' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='attribute_container_device_trigger' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-read-ctf/test-linux-module.abi b/tests/data/test-read-ctf/test-linux-module.abi
index 933b9f82..7f4806cc 100644
--- a/tests/data/test-read-ctf/test-linux-module.abi
+++ b/tests/data/test-read-ctf/test-linux-module.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-linux-module.ko'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-linux-module.ko'>
   <elf-function-symbols>
     <elf-symbol name='testexport' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes' crc='0x533ba8e8'/>
     <elf-symbol name='testexport2' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes' crc='0x65900b2f'/>
diff --git a/tests/data/test-read-ctf/test-list-struct.abi b/tests/data/test-read-ctf/test-list-struct.abi
index 3fdc6aec..bcbbfc81 100644
--- a/tests/data/test-read-ctf/test-list-struct.abi
+++ b/tests/data/test-read-ctf/test-list-struct.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test-list-struct.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test-list-struct.o'>
   <elf-variable-symbols>
     <elf-symbol name='n1' size='16' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='n2' size='16' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-read-ctf/test0.abi b/tests/data/test-read-ctf/test0.abi
index 60d3cf1e..7903841c 100644
--- a/tests/data/test-read-ctf/test0.abi
+++ b/tests/data/test-read-ctf/test0.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test0'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test0'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-ctf/test0.hash.abi b/tests/data/test-read-ctf/test0.hash.abi
index 76dd581e..36faacf2 100644
--- a/tests/data/test-read-ctf/test0.hash.abi
+++ b/tests/data/test-read-ctf/test0.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test0'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test0'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-ctf/test1.so.abi b/tests/data/test-read-ctf/test1.so.abi
index 2ecd5826..94530753 100644
--- a/tests/data/test-read-ctf/test1.so.abi
+++ b/tests/data/test-read-ctf/test1.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test1.so'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test1.so'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-ctf/test1.so.hash.abi b/tests/data/test-read-ctf/test1.so.hash.abi
index 4f8633dd..f70ed683 100644
--- a/tests/data/test-read-ctf/test1.so.hash.abi
+++ b/tests/data/test-read-ctf/test1.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test1.so'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test1.so'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-ctf/test2.so.abi b/tests/data/test-read-ctf/test2.so.abi
index f2fb069d..5731f73d 100644
--- a/tests/data/test-read-ctf/test2.so.abi
+++ b/tests/data/test-read-ctf/test2.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test2.so'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test2.so'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-ctf/test2.so.hash.abi b/tests/data/test-read-ctf/test2.so.hash.abi
index 1efd533a..7de25228 100644
--- a/tests/data/test-read-ctf/test2.so.hash.abi
+++ b/tests/data/test-read-ctf/test2.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test2.so'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test2.so'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-ctf/test3.so.abi b/tests/data/test-read-ctf/test3.so.abi
index 8e2492f3..253f9c08 100644
--- a/tests/data/test-read-ctf/test3.so.abi
+++ b/tests/data/test-read-ctf/test3.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-common/test3.so' soname='test3.so.1'>
+<abi-corpus version='2.2' path='data/test-read-common/test3.so' soname='test3.so.1'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-ctf/test3.so.hash.abi b/tests/data/test-read-ctf/test3.so.hash.abi
index f991d33a..dff5fdc8 100644
--- a/tests/data/test-read-ctf/test3.so.hash.abi
+++ b/tests/data/test-read-ctf/test3.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-common/test3.so' soname='test3.so.1'>
+<abi-corpus version='2.2' path='data/test-read-common/test3.so' soname='test3.so.1'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-ctf/test4.so.abi b/tests/data/test-read-ctf/test4.so.abi
index 9f4e9255..90549d45 100644
--- a/tests/data/test-read-ctf/test4.so.abi
+++ b/tests/data/test-read-ctf/test4.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-common/test4.so'>
+<abi-corpus version='2.2' path='data/test-read-common/test4.so'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-ctf/test4.so.hash.abi b/tests/data/test-read-ctf/test4.so.hash.abi
index 1e952c75..13712aa2 100644
--- a/tests/data/test-read-ctf/test4.so.hash.abi
+++ b/tests/data/test-read-ctf/test4.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-common/test4.so'>
+<abi-corpus version='2.2' path='data/test-read-common/test4.so'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-ctf/test5.o.abi b/tests/data/test-read-ctf/test5.o.abi
index 814aff7f..be354278 100644
--- a/tests/data/test-read-ctf/test5.o.abi
+++ b/tests/data/test-read-ctf/test5.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test5.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test5.o'>
   <elf-function-symbols>
     <elf-symbol name='bar' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='bar2' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-read-ctf/test7.o.abi b/tests/data/test-read-ctf/test7.o.abi
index 65371cf5..16c44565 100644
--- a/tests/data/test-read-ctf/test7.o.abi
+++ b/tests/data/test-read-ctf/test7.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test7.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test7.o'>
   <elf-function-symbols>
     <elf-symbol name='first_type_constructor' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-ctf/test8.o.abi b/tests/data/test-read-ctf/test8.o.abi
index 430bc128..cee2b634 100644
--- a/tests/data/test-read-ctf/test8.o.abi
+++ b/tests/data/test-read-ctf/test8.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test8.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test8.o'>
   <elf-function-symbols>
     <elf-symbol name='bar' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-ctf/test9.o.abi b/tests/data/test-read-ctf/test9.o.abi
index 5c89f821..ba175866 100644
--- a/tests/data/test-read-ctf/test9.o.abi
+++ b/tests/data/test-read-ctf/test9.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='data/test-read-ctf/test9.o'>
+<abi-corpus version='2.2' path='data/test-read-ctf/test9.o'>
   <elf-function-symbols>
     <elf-symbol name='foo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi b/tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi
index 69477588..1d0664a1 100644
--- a/tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi
+++ b/tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='build/cached/third_party/boost-1.60.0/libboost_system.so'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-dwarf/PR22122-libftdc.so.abi b/tests/data/test-read-dwarf/PR22122-libftdc.so.abi
index 30cd0f99..5d1ea873 100644
--- a/tests/data/test-read-dwarf/PR22122-libftdc.so.abi
+++ b/tests/data/test-read-dwarf/PR22122-libftdc.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='build/cached/third_party/s2/libs2.so'/>
     <dependency name='build/cached/third_party/s2/util/math/libmath.so'/>
diff --git a/tests/data/test-read-dwarf/PR24378-fn-is-not-scope.abi b/tests/data/test-read-dwarf/PR24378-fn-is-not-scope.abi
index a2448392..6740a3f2 100644
--- a/tests/data/test-read-dwarf/PR24378-fn-is-not-scope.abi
+++ b/tests/data/test-read-dwarf/PR24378-fn-is-not-scope.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-function-symbols>
     <elf-symbol name='_ZN4stac14buggy_functionEPFvPFfiiEE' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi b/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi
index 4e4d96f6..e242bc94 100644
--- a/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi
+++ b/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-function-symbols>
     <elf-symbol name='__sdhci_add_host' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes' crc='0x74ae518'/>
     <elf-symbol name='__sdhci_read_caps' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes' crc='0x711f65c'/>
diff --git a/tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi b/tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi
index 7785efb1..df97dc1d 100644
--- a/tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi
+++ b/tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libgdbm.so.6'>
+<abi-corpus version='2.2' soname='libgdbm.so.6'>
   <elf-needed>
     <dependency name='libc.so.6'/>
     <dependency name='ld-linux-x86-64.so.2'/>
diff --git a/tests/data/test-read-dwarf/PR26261/PR26261-exe.abi b/tests/data/test-read-dwarf/PR26261/PR26261-exe.abi
index 9ae5cd7d..8460c0ce 100644
--- a/tests/data/test-read-dwarf/PR26261/PR26261-exe.abi
+++ b/tests/data/test-read-dwarf/PR26261/PR26261-exe.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-dwarf/PR27700/test-PR27700.abi b/tests/data/test-read-dwarf/PR27700/test-PR27700.abi
index 092ce75e..4a5d1ad2 100644
--- a/tests/data/test-read-dwarf/PR27700/test-PR27700.abi
+++ b/tests/data/test-read-dwarf/PR27700/test-PR27700.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-function-symbols>
     <elf-symbol name='foo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-dwarf/PR28584/PR28584-smv.clang.o.abi b/tests/data/test-read-dwarf/PR28584/PR28584-smv.clang.o.abi
index 467bdd10..4d10a3ef 100644
--- a/tests/data/test-read-dwarf/PR28584/PR28584-smv.clang.o.abi
+++ b/tests/data/test-read-dwarf/PR28584/PR28584-smv.clang.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-variable-symbols>
     <elf-symbol name='_ZN1N1S1DE' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-variable-symbols>
diff --git a/tests/data/test-read-dwarf/PR29443-missing-xx.o.abi b/tests/data/test-read-dwarf/PR29443-missing-xx.o.abi
index 5c5e4f96..963c21e6 100644
--- a/tests/data/test-read-dwarf/PR29443-missing-xx.o.abi
+++ b/tests/data/test-read-dwarf/PR29443-missing-xx.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-variable-symbols>
     <elf-symbol name='a' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='xx' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-read-dwarf/PR29692-kdelibs3-libkjava.so.1.0.0.abi b/tests/data/test-read-dwarf/PR29692-kdelibs3-libkjava.so.1.0.0.abi
index e2b3e145..122a075a 100644
--- a/tests/data/test-read-dwarf/PR29692-kdelibs3-libkjava.so.1.0.0.abi
+++ b/tests/data/test-read-dwarf/PR29692-kdelibs3-libkjava.so.1.0.0.abi
@@ -1,2 +1,2 @@ 
-<abi-corpus version='2.1' soname='libkjava.so.1'>
+<abi-corpus version='2.2' soname='libkjava.so.1'>
 </abi-corpus>
diff --git a/tests/data/test-read-dwarf/libtest23.so.abi b/tests/data/test-read-dwarf/libtest23.so.abi
index fd5f68b3..ba1cf14c 100644
--- a/tests/data/test-read-dwarf/libtest23.so.abi
+++ b/tests/data/test-read-dwarf/libtest23.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi b/tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi
index 01bb1a4c..cf5a2258 100644
--- a/tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi
+++ b/tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libgcc_s.so.1'/>
     <dependency name='libc.so.6'/>
diff --git a/tests/data/test-read-dwarf/libtest24-drop-fns.so.abi b/tests/data/test-read-dwarf/libtest24-drop-fns.so.abi
index 01bb1a4c..cf5a2258 100644
--- a/tests/data/test-read-dwarf/libtest24-drop-fns.so.abi
+++ b/tests/data/test-read-dwarf/libtest24-drop-fns.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libgcc_s.so.1'/>
     <dependency name='libc.so.6'/>
diff --git a/tests/data/test-read-dwarf/test-PR26568-1.o.abi b/tests/data/test-read-dwarf/test-PR26568-1.o.abi
index e5d3d1f5..aad777b8 100644
--- a/tests/data/test-read-dwarf/test-PR26568-1.o.abi
+++ b/tests/data/test-read-dwarf/test-PR26568-1.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-function-symbols>
     <elf-symbol name='fun' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-dwarf/test-PR26568-2.o.abi b/tests/data/test-read-dwarf/test-PR26568-2.o.abi
index 4502524a..9c8fdd9c 100644
--- a/tests/data/test-read-dwarf/test-PR26568-2.o.abi
+++ b/tests/data/test-read-dwarf/test-PR26568-2.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-function-symbols>
     <elf-symbol name='fun' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-dwarf/test-fallback.abi b/tests/data/test-read-dwarf/test-fallback.abi
index ebbae7ef..14879bee 100644
--- a/tests/data/test-read-dwarf/test-fallback.abi
+++ b/tests/data/test-read-dwarf/test-fallback.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-variable-symbols>
     <elf-symbol name='a' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-variable-symbols>
diff --git a/tests/data/test-read-dwarf/test-libaaudio.so.abi b/tests/data/test-read-dwarf/test-libaaudio.so.abi
index 98ddd260..beb00348 100644
--- a/tests/data/test-read-dwarf/test-libaaudio.so.abi
+++ b/tests/data/test-read-dwarf/test-libaaudio.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libaaudio.so'>
+<abi-corpus version='2.2' soname='libaaudio.so'>
   <elf-needed>
     <dependency name='libaaudio_internal.so'/>
     <dependency name='libaudioclient.so'/>
diff --git a/tests/data/test-read-dwarf/test-libandroid.so.abi b/tests/data/test-read-dwarf/test-libandroid.so.abi
index 4ef47d7a..cb32d1fd 100644
--- a/tests/data/test-read-dwarf/test-libandroid.so.abi
+++ b/tests/data/test-read-dwarf/test-libandroid.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libandroid.so'>
+<abi-corpus version='2.2' soname='libandroid.so'>
   <elf-needed>
     <dependency name='liblog.so'/>
     <dependency name='libhidlbase.so'/>
diff --git a/tests/data/test-read-dwarf/test-suppressed-alias.o.abi b/tests/data/test-read-dwarf/test-suppressed-alias.o.abi
index a22ee7d3..2198daf1 100644
--- a/tests/data/test-read-dwarf/test-suppressed-alias.o.abi
+++ b/tests/data/test-read-dwarf/test-suppressed-alias.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-function-symbols>
     <elf-symbol name='alias_func' type='func-type' binding='weak-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='main_func' type='func-type' binding='global-binding' visibility='default-visibility' alias='alias_func' is-defined='yes'/>
diff --git a/tests/data/test-read-dwarf/test0.abi b/tests/data/test-read-dwarf/test0.abi
index 6b13550c..6c23a4d2 100644
--- a/tests/data/test-read-dwarf/test0.abi
+++ b/tests/data/test-read-dwarf/test0.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-dwarf/test0.hash.abi b/tests/data/test-read-dwarf/test0.hash.abi
index 4c2ae738..14f7cd5d 100644
--- a/tests/data/test-read-dwarf/test0.hash.abi
+++ b/tests/data/test-read-dwarf/test0.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-dwarf/test1.abi b/tests/data/test-read-dwarf/test1.abi
index 2d08d2a0..292e690d 100644
--- a/tests/data/test-read-dwarf/test1.abi
+++ b/tests/data/test-read-dwarf/test1.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-dwarf/test1.hash.abi b/tests/data/test-read-dwarf/test1.hash.abi
index 998c8c10..a0b33462 100644
--- a/tests/data/test-read-dwarf/test1.hash.abi
+++ b/tests/data/test-read-dwarf/test1.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi b/tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi
index 3cbf69c5..ca521c2a 100644
--- a/tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi
+++ b/tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='build/debug/third_party/boost-1.56.0/libboost_system.so'/>
     <dependency name='librt.so.1'/>
diff --git a/tests/data/test-read-dwarf/test11-pr18828.so.abi b/tests/data/test-read-dwarf/test11-pr18828.so.abi
index 925643af..7ca1b345 100644
--- a/tests/data/test-read-dwarf/test11-pr18828.so.abi
+++ b/tests/data/test-read-dwarf/test11-pr18828.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='build/debug/mongo/db/libserver_parameters.so'/>
     <dependency name='build/debug/mongo/libbase.so'/>
diff --git a/tests/data/test-read-dwarf/test12-pr18844.so.abi b/tests/data/test-read-dwarf/test12-pr18844.so.abi
index e7ad31c4..fc63f084 100644
--- a/tests/data/test-read-dwarf/test12-pr18844.so.abi
+++ b/tests/data/test-read-dwarf/test12-pr18844.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='build/debug/mongo/bson/mutable/libmutable_bson.so'/>
     <dependency name='build/debug/mongo/bson/util/libbson_extract.so'/>
diff --git a/tests/data/test-read-dwarf/test13-pr18894.so.abi b/tests/data/test-read-dwarf/test13-pr18894.so.abi
index a8e836b1..0f1f10d1 100644
--- a/tests/data/test-read-dwarf/test13-pr18894.so.abi
+++ b/tests/data/test-read-dwarf/test13-pr18894.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libdbus-1.so.3'>
+<abi-corpus version='2.2' soname='libdbus-1.so.3'>
   <elf-needed>
     <dependency name='librt.so.1'/>
     <dependency name='libpthread.so.0'/>
diff --git a/tests/data/test-read-dwarf/test14-pr18893.so.abi b/tests/data/test-read-dwarf/test14-pr18893.so.abi
index 5ef20ee9..7a997b4b 100644
--- a/tests/data/test-read-dwarf/test14-pr18893.so.abi
+++ b/tests/data/test-read-dwarf/test14-pr18893.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libGLU.so.1'>
+<abi-corpus version='2.2' soname='libGLU.so.1'>
   <elf-needed>
     <dependency name='libGL.so.1'/>
     <dependency name='libstdc++.so.6'/>
diff --git a/tests/data/test-read-dwarf/test15-pr18892.so.abi b/tests/data/test-read-dwarf/test15-pr18892.so.abi
index 0b2f8fa2..353b394d 100644
--- a/tests/data/test-read-dwarf/test15-pr18892.so.abi
+++ b/tests/data/test-read-dwarf/test15-pr18892.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libtsan.so.0'>
+<abi-corpus version='2.2' soname='libtsan.so.0'>
   <elf-needed>
     <dependency name='librt.so.1'/>
     <dependency name='libpthread.so.0'/>
diff --git a/tests/data/test-read-dwarf/test16-pr18904.so.abi b/tests/data/test-read-dwarf/test16-pr18904.so.abi
index f98bbdc5..8965b90a 100644
--- a/tests/data/test-read-dwarf/test16-pr18904.so.abi
+++ b/tests/data/test-read-dwarf/test16-pr18904.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='liboffloadmic_host.so.5'>
+<abi-corpus version='2.2' soname='liboffloadmic_host.so.5'>
   <elf-needed>
     <dependency name='libdl.so.2'/>
     <dependency name='libstdc++.so.6'/>
diff --git a/tests/data/test-read-dwarf/test17-pr19027.so.abi b/tests/data/test-read-dwarf/test17-pr19027.so.abi
index 859dd13c..cdf0f75c 100644
--- a/tests/data/test-read-dwarf/test17-pr19027.so.abi
+++ b/tests/data/test-read-dwarf/test17-pr19027.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libharfbuzz.so.0'>
+<abi-corpus version='2.2' soname='libharfbuzz.so.0'>
   <elf-needed>
     <dependency name='libglib-2.0.so.0'/>
     <dependency name='libfreetype.so.6'/>
diff --git a/tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi b/tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi
index b6d567d3..77dd7023 100644
--- a/tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi
+++ b/tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libvtkRenderingLIC-6.1.so.1'>
+<abi-corpus version='2.2' soname='libvtkRenderingLIC-6.1.so.1'>
   <elf-needed>
     <dependency name='libvtkIOLegacy-6.1.so.1'/>
     <dependency name='libvtkIOXML-6.1.so.1'/>
diff --git a/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi b/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi
index 8b468a5b..d6284965 100644
--- a/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi
+++ b/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libtcmalloc_and_profiler.so.4'>
+<abi-corpus version='2.2' soname='libtcmalloc_and_profiler.so.4'>
   <elf-needed>
     <dependency name='libunwind.so.8'/>
     <dependency name='libpthread.so.0'/>
diff --git a/tests/data/test-read-dwarf/test2.so.abi b/tests/data/test-read-dwarf/test2.so.abi
index 0dfa8f90..e79c1c3b 100644
--- a/tests/data/test-read-dwarf/test2.so.abi
+++ b/tests/data/test-read-dwarf/test2.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-dwarf/test2.so.hash.abi b/tests/data/test-read-dwarf/test2.so.hash.abi
index 4be854a0..de63fc63 100644
--- a/tests/data/test-read-dwarf/test2.so.hash.abi
+++ b/tests/data/test-read-dwarf/test2.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi b/tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi
index 568fb4bd..4a852943 100644
--- a/tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi
+++ b/tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libvtkParallelCore-6.1.so.1'>
+<abi-corpus version='2.2' soname='libvtkParallelCore-6.1.so.1'>
   <elf-needed>
     <dependency name='libvtkIOLegacy-6.1.so.1'/>
     <dependency name='libvtkIOCore-6.1.so.1'/>
diff --git a/tests/data/test-read-dwarf/test21-pr19092.so.abi b/tests/data/test-read-dwarf/test21-pr19092.so.abi
index 760ef922..98745b4f 100644
--- a/tests/data/test-read-dwarf/test21-pr19092.so.abi
+++ b/tests/data/test-read-dwarf/test21-pr19092.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi b/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi
index e62b5985..38e9e997 100644
--- a/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi
+++ b/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='libstdc++.so.6'>
+<abi-corpus version='2.2' soname='libstdc++.so.6'>
   <elf-needed>
     <dependency name='libm.so.6'/>
     <dependency name='libc.so.6'/>
diff --git a/tests/data/test-read-dwarf/test3-alias-1.so.hash.abi b/tests/data/test-read-dwarf/test3-alias-1.so.hash.abi
index acf0a723..c5c86da2 100644
--- a/tests/data/test-read-dwarf/test3-alias-1.so.hash.abi
+++ b/tests/data/test-read-dwarf/test3-alias-1.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='test3.so.1'>
+<abi-corpus version='2.2' soname='test3.so.1'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-dwarf/test3-alias-2.so.hash.abi b/tests/data/test-read-dwarf/test3-alias-2.so.hash.abi
index acf0a723..c5c86da2 100644
--- a/tests/data/test-read-dwarf/test3-alias-2.so.hash.abi
+++ b/tests/data/test-read-dwarf/test3-alias-2.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='test3.so.1'>
+<abi-corpus version='2.2' soname='test3.so.1'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-dwarf/test3-alias-3.so.hash.abi b/tests/data/test-read-dwarf/test3-alias-3.so.hash.abi
index acf0a723..c5c86da2 100644
--- a/tests/data/test-read-dwarf/test3-alias-3.so.hash.abi
+++ b/tests/data/test-read-dwarf/test3-alias-3.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='test3.so.1'>
+<abi-corpus version='2.2' soname='test3.so.1'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-dwarf/test3-alias-4.so.hash.abi b/tests/data/test-read-dwarf/test3-alias-4.so.hash.abi
index acf0a723..c5c86da2 100644
--- a/tests/data/test-read-dwarf/test3-alias-4.so.hash.abi
+++ b/tests/data/test-read-dwarf/test3-alias-4.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='test3.so.1'>
+<abi-corpus version='2.2' soname='test3.so.1'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-dwarf/test3.so.abi b/tests/data/test-read-dwarf/test3.so.abi
index 9b7b7a34..c892e950 100644
--- a/tests/data/test-read-dwarf/test3.so.abi
+++ b/tests/data/test-read-dwarf/test3.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='test3.so.1'>
+<abi-corpus version='2.2' soname='test3.so.1'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-dwarf/test3.so.hash.abi b/tests/data/test-read-dwarf/test3.so.hash.abi
index acf0a723..c5c86da2 100644
--- a/tests/data/test-read-dwarf/test3.so.hash.abi
+++ b/tests/data/test-read-dwarf/test3.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' soname='test3.so.1'>
+<abi-corpus version='2.2' soname='test3.so.1'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-dwarf/test4.so.abi b/tests/data/test-read-dwarf/test4.so.abi
index 34c8b1ac..94f62310 100644
--- a/tests/data/test-read-dwarf/test4.so.abi
+++ b/tests/data/test-read-dwarf/test4.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-dwarf/test4.so.hash.abi b/tests/data/test-read-dwarf/test4.so.hash.abi
index f74aebaf..d6328c8c 100644
--- a/tests/data/test-read-dwarf/test4.so.hash.abi
+++ b/tests/data/test-read-dwarf/test4.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libc.so.6'/>
   </elf-needed>
diff --git a/tests/data/test-read-dwarf/test5.o.abi b/tests/data/test-read-dwarf/test5.o.abi
index e8229b20..9fa8b023 100644
--- a/tests/data/test-read-dwarf/test5.o.abi
+++ b/tests/data/test-read-dwarf/test5.o.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-function-symbols>
     <elf-symbol name='_Z3barPv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-dwarf/test5.o.hash.abi b/tests/data/test-read-dwarf/test5.o.hash.abi
index 174d56b1..00a57983 100644
--- a/tests/data/test-read-dwarf/test5.o.hash.abi
+++ b/tests/data/test-read-dwarf/test5.o.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-function-symbols>
     <elf-symbol name='_Z3barPv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-dwarf/test6.so.abi b/tests/data/test-read-dwarf/test6.so.abi
index 17fcdecd..9007c596 100644
--- a/tests/data/test-read-dwarf/test6.so.abi
+++ b/tests/data/test-read-dwarf/test6.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-dwarf/test6.so.hash.abi b/tests/data/test-read-dwarf/test6.so.hash.abi
index 5495813c..67688333 100644
--- a/tests/data/test-read-dwarf/test6.so.hash.abi
+++ b/tests/data/test-read-dwarf/test6.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-dwarf/test7.so.abi b/tests/data/test-read-dwarf/test7.so.abi
index 7068711a..a9657f9a 100644
--- a/tests/data/test-read-dwarf/test7.so.abi
+++ b/tests/data/test-read-dwarf/test7.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-function-symbols>
     <elf-symbol name='_Z3fooR1S' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-dwarf/test7.so.hash.abi b/tests/data/test-read-dwarf/test7.so.hash.abi
index 0a53f0dc..dda3d9ae 100644
--- a/tests/data/test-read-dwarf/test7.so.hash.abi
+++ b/tests/data/test-read-dwarf/test7.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-function-symbols>
     <elf-symbol name='_Z3fooR1S' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi b/tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi
index c02b7230..2d1a6417 100644
--- a/tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi
+++ b/tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-dwarf/test8-qualified-this-pointer.so.hash.abi b/tests/data/test-read-dwarf/test8-qualified-this-pointer.so.hash.abi
index 064e93f6..a6e3f429 100644
--- a/tests/data/test-read-dwarf/test8-qualified-this-pointer.so.hash.abi
+++ b/tests/data/test-read-dwarf/test8-qualified-this-pointer.so.hash.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='libstdc++.so.6'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi b/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi
index 3557763c..05129ee2 100644
--- a/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi
+++ b/tests/data/test-read-dwarf/test9-pr18818-clang.so.abi
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1'>
+<abi-corpus version='2.2'>
   <elf-needed>
     <dependency name='build/debug/third_party/boost-1.56.0/libboost_system.so'/>
     <dependency name='libm.so.6'/>
diff --git a/tests/data/test-read-write/test-crc.xml b/tests/data/test-read-write/test-crc.xml
index 2db32b7c..5b3ac93e 100644
--- a/tests/data/test-read-write/test-crc.xml
+++ b/tests/data/test-read-write/test-crc.xml
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='tests/data/test-symtab/kernel-modversions/one_of_each.ko' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.2' path='tests/data/test-symtab/kernel-modversions/one_of_each.ko' architecture='elf-amd-x86_64'>
   <elf-function-symbols>
     <elf-symbol name='exported_function' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes' crc='0xe52d5bcf'/>
     <elf-symbol name='exported_function_gpl' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes' crc='0xfda43846'/>
diff --git a/tests/data/test-read-write/test26.xml b/tests/data/test-read-write/test26.xml
index 178ab819..2b1fc5f7 100644
--- a/tests/data/test-read-write/test26.xml
+++ b/tests/data/test-read-write/test26.xml
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='libtest-v0.so'>
+<abi-corpus version='2.2' path='libtest-v0.so'>
   <elf-function-symbols>
     <elf-symbol name='_fini' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
     <elf-symbol name='_init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
diff --git a/tests/data/test-read-write/test27.xml b/tests/data/test-read-write/test27.xml
index 8b53f905..4afc49b7 100644
--- a/tests/data/test-read-write/test27.xml
+++ b/tests/data/test-read-write/test27.xml
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='repr7' architecture='elf-amd-x86_64'>
+<abi-corpus version='2.2' path='repr7' architecture='elf-amd-x86_64'>
   <elf-function-symbols>
     <elf-symbol name='_Z2fni' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
   </elf-function-symbols>
diff --git a/tests/data/test-read-write/test28-without-std-fns-ref.xml b/tests/data/test-read-write/test28-without-std-fns-ref.xml
index 8b9ba795..dee40fda 100644
--- a/tests/data/test-read-write/test28-without-std-fns-ref.xml
+++ b/tests/data/test-read-write/test28-without-std-fns-ref.xml
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='tests/data/test-read-dwarf/libtest24-drop-fns.so'>
+<abi-corpus version='2.2' path='tests/data/test-read-dwarf/libtest24-drop-fns.so'>
   <elf-needed>
     <dependency name='libgcc_s.so.1'/>
     <dependency name='libc.so.6'/>
diff --git a/tests/data/test-read-write/test28-without-std-vars-ref.xml b/tests/data/test-read-write/test28-without-std-vars-ref.xml
index 6e6cb424..b1b7bf2e 100644
--- a/tests/data/test-read-write/test28-without-std-vars-ref.xml
+++ b/tests/data/test-read-write/test28-without-std-vars-ref.xml
@@ -1,4 +1,4 @@ 
-<abi-corpus version='2.1' path='tests/data/test-read-dwarf/libtest24-drop-fns.so'>
+<abi-corpus version='2.2' path='tests/data/test-read-dwarf/libtest24-drop-fns.so'>
   <elf-needed>
     <dependency name='libgcc_s.so.1'/>
     <dependency name='libc.so.6'/>
diff --git a/tests/test-abidiff-exit.cc b/tests/test-abidiff-exit.cc
index f7ded109..22bc9b77 100644
--- a/tests/test-abidiff-exit.cc
+++ b/tests/test-abidiff-exit.cc
@@ -680,6 +680,28 @@  InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-allow-type-region-v0--v5-report-2.txt",
     "output/test-abidiff-exit/test-allow-type-region-v0--v5-report-2.txt"
   },
+  {
+    "data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.o",
+    "data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.o",
+    "",
+    "",
+    "",
+    "--no-default-suppression",
+    abigail::tools_utils::ABIDIFF_ABI_CHANGE,
+    "data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-1.txt",
+    "output/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-1.txt"
+  },
+  {
+    "data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v0/test1.o",
+    "data/test-abidiff-exit/ada-subrange/test1-ada-subrange/v1/test1.o",
+    "",
+    "",
+    "",
+    "--no-default-suppression --leaf-changes-only",
+    abigail::tools_utils::ABIDIFF_ABI_CHANGE,
+    "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"
+  },
 #ifdef WITH_BTF
   {
     "data/test-abidiff-exit/btf/test0-v0.o",