[15/17] ir, comparison, default-reporter: Consider sub-ranges in array diffs

Message ID 20240716145541.473065-16-dodji@redhat.com
State New
Headers
Series Support self comparison of vmlinux & modules using BTF/CTF |

Commit Message

Dodji Seketeli July 16, 2024, 2:55 p.m. UTC
  From: Dodji Seketeli <dodji@redhat.com>

It appears that the comparison engine does not take changes in the
underlying types of sub-ranges into account when looking for sub-range
changes.

This patch fixes that issue.

Then the patch amends the diff model of array_diff to make it take
into account sub-range diffs as children diff nodes.  Then it updates
redundancy propagation to make sure changes to sub-ranges are always
reported even when they are redundant.  The patch filters out harmless
name changes to integral types, by default.

	* include/abg-comparison.h (array_diff::array_diff): Take a vector
	of sub-range diffs as children diff nodes.
	(array_diff::{subrange_diffs, any_subrange_diff_to_be_reported}):
	Declare new methods.
	(is_anonymous_subrange_diff): Declare new function.
	* src/abg-comp-filter.cc (integral_type_has_harmless_name_change):
	Define new function.
	(has_harmless_name_change): Use the new
	integral_type_has_harmless_name_change.
	* src/abg-comparison-priv.h (array_diff::priv::subrange_diffs_):
	Define new data member.
	* src/abg-comparison.cc (is_anonymous_class_or_union_diff): Fix
	comment.
	(is_anonymous_subrange_diff): Define new function.
	(array_diff::chain_into_hierarchy): Append sub-range diffs as
	children nodes of the array_diff node.
	(array_diff::array_diff): Take a vector of sub-range diffs as
	children diff nodes.
	(array_diff::{subrange_diffs, any_subrange_diff_to_be_reported}):
	Define new methods.
	(array_diff::has_changes): Take sub-range diffs into account.
	(compute_diff): In the overload for array_type_def, compute diffs
	for sub-ranges as part of the diff for array_type_defs.
	(leaf_diff_node_marker_visitor::visit_begin): Do not consider an
	anonymous sub-range diff node as being a leaf diff node to report
	about.
	(redundancy_marking_visitor::visit_end): Report all sub-range diff
	nodes changes; do not propagate their (potential) redundancy to
	their array_diff node parent.
	* src/abg-default-reporter.cc (default_reporter::report): In the
	overload for array_diff, if there is a sub-range change to be
	reported, then report it.
	* src/abg-ir-priv.h (real_type::base_type): Add SIZE_BASE_TYPE,
	SSIZE_BASE_TYPE, BIT_SIZE_BASE_TYPE, SBIT_SIZE_BASE_TYPE,
	ARRAY_SIZE_BASE_TYPE enumerators to this enum.
	* src/abg-ir.cc (parse_base_real_type): Support parsing real type
	names that are __ARRAY_SIZE_TYPE__, sizetype, ssizetype,
	bitsizetype and sbitsizetype.
	(real_type::to_string): Support IZE_BASE_TYPE, SSIZE_BASE_TYPE,
	BIT_SIZE_BASE_TYPE, SBIT_SIZE_BASE_TYPE and ARRAY_SIZE_BASE_TYPE
	enumerators.
	(equals): In the overload for array_type_def::subrange_type,
	compare the underlying types of the sub-ranged.  In the overload
	for array_type_def, consider sub-range changes mismatch as a local
	non-type change.  This is so that changes to sub-ranges don't get
	filtered out because changes to element types are redundant.
	* src/abg-reporter-priv.cc (represent): In the overload for
	subrange_diff, clean up reporting of change of bound values.
	Also, add reports of changes from non-finite to finite size.
	* tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-1.txt:
	Adjust.
	* Tests/data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-2.txt:
	Likewise.
	* tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt:
	Likewise.
	* tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt:
	Likewise.
	* tests/data/test-abidiff-exit/test-allow-type-array-v0--v1-report-1.txt:
	Likewise.
	* tests/data/test-abidiff-exit/test-allow-type-array-v0--v3-report-1.txt:
	Likewise.
	* tests/data/test-abidiff/test-PR27985-report.txt: Likewise.
	* tests/data/test-diff-dwarf/test10-report.txt: Likewise.
	* tests/data/test-diff-dwarf/test11-report.txt: Likewise.
	* tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-clang-report-0.txt:
	Likewise.
	* tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-gcc-report-0.txt:
	Likewise.
	* tests/data/test-diff-filter/PR24430-fold-qualified-array-report-0.txt:
	Likewise.
	* tests/data/test-diff-filter/test-PR29811-0-report-1.txt:
	Likewise.
	* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
	Likewise.
	* tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt:
	Likewise.
	* tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt:
	Likewise.
	* tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt:
	Likewise.
	* tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt:
	Likewise.
	* tests/data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt:
	Likewise.
	* tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt:
	Likewise.
	* tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt:
	Likewise.
	* tests/data/test-diff-suppr/test-has-data-member-inserted-at-1-report-1.txt:
	Likewise.
	* tests/data/test-diff-suppr/test-has-strict-flexible-array-data-member-conversion-report-2.txt:
	Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
 include/abg-comparison.h                      |  21 +++-
 src/abg-comp-filter.cc                        |  44 ++++++-
 src/abg-comparison-priv.h                     |   7 +-
 src/abg-comparison.cc                         | 111 +++++++++++++++---
 src/abg-default-reporter.cc                   |  18 +++
 src/abg-ir-priv.h                             |   8 +-
 src/abg-ir.cc                                 |  36 +++++-
 src/abg-reporter-priv.cc                      |  27 +++--
 .../test1-ada-subrange-report-1.txt           |   4 +-
 .../test1-ada-subrange-report-2.txt           |   4 +-
 .../test2-ada-subrange-redundant-report-1.txt |   6 +-
 .../test2-ada-subrange-redundant-report-2.txt |   6 +-
 .../test-allow-type-array-v0--v1-report-1.txt |   2 +
 .../test-allow-type-array-v0--v3-report-1.txt |   2 +
 .../data/test-abidiff/test-PR27985-report.txt |   2 +
 tests/data/test-diff-dwarf/test10-report.txt  |   2 +
 tests/data/test-diff-dwarf/test11-report.txt  |   4 +
 ...t35-pr19173-libfoo-long-clang-report-0.txt |   2 +
 ...est35-pr19173-libfoo-long-gcc-report-0.txt |   2 +
 .../PR24430-fold-qualified-array-report-0.txt |   3 +
 .../test-PR29811-0-report-1.txt               |   4 +
 .../test30-pr18904-rvalueref-report0.txt      |   2 +
 .../test30-pr18904-rvalueref-report1.txt      |   2 +
 .../test30-pr18904-rvalueref-report2.txt      |   2 +
 .../test35-pr18754-no-added-syms-report-0.txt |   2 +
 ...libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt |   4 +-
 .../nss-3.23.0-1.0.fc23.x86_64-report-0.txt   |   2 +
 ...bb-4.3-3.20141204.fc23.x86_64-report-0.txt |   2 +
 ...bb-4.3-3.20141204.fc23.x86_64-report-1.txt |   2 +
 ...has-data-member-inserted-at-1-report-1.txt |   2 +
 ...-array-data-member-conversion-report-2.txt |   2 +
 31 files changed, 293 insertions(+), 44 deletions(-)
  

Patch

diff --git a/include/abg-comparison.h b/include/abg-comparison.h
index 881f525d..3178c97a 100644
--- a/include/abg-comparison.h
+++ b/include/abg-comparison.h
@@ -1541,10 +1541,11 @@  class array_diff : public type_diff_base
   std::unique_ptr<priv> priv_;
 
 protected:
-  array_diff(const array_type_def_sptr	first,
-	     const array_type_def_sptr	second,
-	     diff_sptr			element_type_diff,
-	     diff_context_sptr		ctxt = diff_context_sptr());
+  array_diff(const array_type_def_sptr		first,
+	     const array_type_def_sptr		second,
+	     diff_sptr				element_type_diff,
+	     vector<subrange_diff_sptr>&	subrange_diffs,
+	     diff_context_sptr			ctxt = diff_context_sptr());
 
 public:
   const array_type_def_sptr
@@ -1556,9 +1557,18 @@  public:
   const diff_sptr&
   element_type_diff() const;
 
+  const vector<subrange_diff_sptr>&
+  subrange_diffs() const;
+
   void
   element_type_diff(diff_sptr);
 
+  void
+  subrange_diffs(const vector<subrange_diff_sptr>&);
+
+  bool
+  any_subrange_diff_to_be_reported() const;
+
   virtual const string&
   get_pretty_representation() const;
 
@@ -2980,6 +2990,9 @@  is_anonymous_class_or_union_diff(const diff* d);
 const subrange_diff*
 is_subrange_diff(const diff* diff);
 
+const subrange_diff*
+is_anonymous_subrange_diff(const diff* d);
+
 const array_diff*
 is_array_diff(const diff* diff);
 
diff --git a/src/abg-comp-filter.cc b/src/abg-comp-filter.cc
index df87e05e..b0ba8a0f 100644
--- a/src/abg-comp-filter.cc
+++ b/src/abg-comp-filter.cc
@@ -17,6 +17,7 @@  ABG_BEGIN_EXPORT_DECLARATIONS
 
 #include "abg-comp-filter.h"
 #include "abg-tools-utils.h"
+#include "abg-ir-priv.h"
 
 ABG_END_EXPORT_DECLARATIONS
 // </headers defining libabigail's API>
@@ -711,17 +712,53 @@  decl_name_changed(const type_or_decl_base_sptr& d1,
 		  const type_or_decl_base_sptr& d2)
 {return decl_name_changed(d1.get(), d2.get());}
 
-/// Test if a diff nodes carries a changes in which two decls have
+/// Test if a diff node carries a changes in which two decls have
 /// different names.
 ///
 /// @param d the diff node to consider.
 ///
-/// @return true iff d carries a changes in which two decls have
+/// @return true iff d carries a change in which two decls have
 /// different names.
 static bool
 decl_name_changed(const diff *d)
 {return decl_name_changed(d->first_subject(), d->second_subject());}
 
+/// Test if a diff node carries a change whereby two integral types
+/// have different names in a harmless way.
+///
+/// Basically, if the integral type name change is accompanied by a
+/// size change then the change is considered harmful.  If there are
+/// modifiers change, the change is considered harmful.
+static bool
+integral_type_has_harmless_name_change(const decl_base_sptr& f,
+				       const decl_base_sptr& s)
+{
+  if ((is_integral_type(f) || f->get_name().empty())
+      && (is_integral_type(s) || s->get_name().empty())
+      && decl_name_changed(f, s)
+      && (is_type(f)->get_size_in_bits()
+	  == is_type(s)->get_size_in_bits())
+      && (is_type(f)->get_alignment_in_bits()
+	  == is_type(s)->get_alignment_in_bits()))
+    {
+      real_type fi, si;
+      ABG_ASSERT(f->get_name().empty()
+		 || parse_real_type(f->get_name(), fi));
+      ABG_ASSERT(s->get_name().empty()
+		 || parse_real_type(s->get_name(), si));
+
+      if (fi.get_base_type() == si.get_base_type()
+	  && fi.get_modifiers() != si.get_modifiers())
+	// The base type hasn't changed.  That means only modifiers
+	// changed.  This is considered has harmful by default.
+	return false;
+
+      return true;
+    }
+
+  return false;
+}
+
 /// Test if two decls represents a harmless name change.
 ///
 /// For now, a harmless name change is considered only for a typedef,
@@ -765,7 +802,8 @@  has_harmless_name_change(const decl_base_sptr& f, const decl_base_sptr& s)
 		  && is_enum_type(s)
 		  && !enum_has_non_name_change(*is_enum_type(f),
 					       *is_enum_type(s),
-					       0))));
+					       0))
+	      || integral_type_has_harmless_name_change(f, s)));
 }
 
 /// Test if two decls represents a harmful name change.
diff --git a/src/abg-comparison-priv.h b/src/abg-comparison-priv.h
index e75d9d58..db7946ae 100644
--- a/src/abg-comparison-priv.h
+++ b/src/abg-comparison-priv.h
@@ -429,9 +429,12 @@  struct array_diff::priv
 {
   /// The diff between the two array element types.
   diff_sptr element_type_diff_;
+  vector<subrange_diff_sptr> subrange_diffs_;
 
-  priv(diff_sptr element_type_diff)
-    : element_type_diff_(element_type_diff)
+  priv(diff_sptr element_type_diff,
+       vector<subrange_diff_sptr>& subrange_diffs)
+    : element_type_diff_(element_type_diff),
+      subrange_diffs_(subrange_diffs)
   {}
 };//end struct array_diff::priv
 
diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc
index 93d212e7..65996a84 100644
--- a/src/abg-comparison.cc
+++ b/src/abg-comparison.cc
@@ -714,9 +714,8 @@  is_class_or_union_diff(const diff* d)
 ///
 /// @param d the diff node to consider.
 ///
-/// @return a non-nil pointer to the @ref class_or_union_diff iff @p
-/// denoted by @p d iff @p is pointer to an anonymous class or union
-/// diff.
+/// @return a non-nil pointer to the @ref class_or_union_diff denoted
+/// by @p d iff @p is a pointer to an anonymous class or union diff.
 const class_or_union_diff*
 is_anonymous_class_or_union_diff(const diff* d)
 {
@@ -746,6 +745,23 @@  const subrange_diff*
 is_subrange_diff(const diff* diff)
 {return dynamic_cast<const subrange_diff*>(diff);}
 
+/// Test if a diff node is a @ref subrange_diff between two anonymous
+/// subranges.
+///
+/// @param d the diff node to consider.
+///
+/// @return a non-nil pointer to the @ref subrange_diff denoted by @p
+/// d iff @p d is a pointer to an anonymous @ref subrange_diff.
+const subrange_diff*
+is_anonymous_subrange_diff(const diff* d)
+{
+  if (const subrange_diff* dif = is_subrange_diff(d))
+    if (dif->first_subrange()->get_is_anonymous())
+      return dif;
+
+  return nullptr;
+}
+
 /// Test if a diff node is a @ref array_diff node.
 ///
 /// @param diff the diff node to consider.
@@ -3911,7 +3927,11 @@  compute_diff(array_type_def::subrange_sptr first,
 /// diff::children_node().
 void
 array_diff::chain_into_hierarchy()
-{append_child_node(element_type_diff());}
+{
+  append_child_node(element_type_diff());
+  for (const auto& subrange_diff : subrange_diffs())
+    append_child_node(subrange_diff);
+}
 
 /// Constructor for array_diff
 ///
@@ -3926,9 +3946,10 @@  array_diff::chain_into_hierarchy()
 array_diff::array_diff(const array_type_def_sptr	first,
 		       const array_type_def_sptr	second,
 		       diff_sptr			element_type_diff,
+		       vector<subrange_diff_sptr>&	subrange_diffs,
 		       diff_context_sptr		ctxt)
   : type_diff_base(first, second, ctxt),
-    priv_(new priv(element_type_diff))
+    priv_(new priv(element_type_diff, subrange_diffs))
 {}
 
 /// Getter for the first array of the diff.
@@ -3952,13 +3973,41 @@  const diff_sptr&
 array_diff::element_type_diff() const
 {return priv_->element_type_diff_;}
 
+/// Getter for the diffs between the array subranges.
+///
+/// @return the diffs between the array subranges.
+const vector<subrange_diff_sptr>&
+array_diff::subrange_diffs() const
+{return priv_->subrange_diffs_;}
+
+/// Test if any subrange diff is to be reported.
+///
+/// @return true if any subrange diff is to be reported, false
+/// otherwise.
+bool
+array_diff::any_subrange_diff_to_be_reported() const
+{
+  for (const auto& diff: subrange_diffs())
+    if (diff->to_be_reported())
+      return true;
+
+  return false;
+}
+
 /// Setter for the diff between the two array element types.
 ///
-/// @param d the new diff betweend the two array element types.
+/// @param d the new diff between the two array element types.
 void
 array_diff::element_type_diff(diff_sptr d)
 {priv_->element_type_diff_ = d;}
 
+/// Setter for the diff between the two sets of array sub-ranges.
+///
+/// @param d the new diff between the two sets of array sub-ranges.
+void
+array_diff::subrange_diffs(const vector<subrange_diff_sptr>& d)
+{priv_->subrange_diffs_ = d;}
+
 /// @return the pretty representation for the current instance of @ref
 /// array_diff.
 const string&
@@ -4002,6 +4051,9 @@  array_diff::has_changes() const
     ? element_type_diff()->has_changes()
     : false;
 
+  for (const auto& subrange_diff : subrange_diffs())
+    l |= subrange_diff->has_changes();
+
   return l;
 }
 
@@ -4044,10 +4096,25 @@  compute_diff(array_type_def_sptr	first,
 	     array_type_def_sptr	second,
 	     diff_context_sptr		ctxt)
 {
-  diff_sptr d = compute_diff_for_types(first->get_element_type(),
-				       second->get_element_type(),
-				       ctxt);
-  array_diff_sptr result(new array_diff(first, second, d, ctxt));
+  diff_sptr element_diff = compute_diff_for_types(first->get_element_type(),
+						  second->get_element_type(),
+						  ctxt);
+  vector<subrange_diff_sptr> subrange_diffs;
+  if (first->get_subranges().size() == first->get_subranges().size())
+    {
+      for (unsigned i = 0; i < first->get_subranges().size(); ++i)
+	{
+	  subrange_diff_sptr subrange_diff =
+	    compute_diff(first->get_subranges()[i],
+			 second->get_subranges()[i],
+			 ctxt);
+	  subrange_diffs.push_back(subrange_diff);
+	}
+    }
+  array_diff_sptr result(new array_diff(first, second,
+					element_diff,
+					subrange_diffs,
+					ctxt));
   ctxt->initialize_canonical_diff(result);
   return result;
 }
@@ -11847,6 +11914,8 @@  struct leaf_diff_node_marker_visitor : public diff_node_visitor
 	// typedef change which underlying type is an anonymous
 	// struct/union.
 	&& !is_anonymous_class_or_union_diff(d)
+	// An anonymous subrange doesn't make sense either.
+	&& !is_anonymous_subrange_diff(d)
 	// Don't show decl-only-ness changes either.
 	&& !filtering::has_decl_only_def_change(d)
 	// Sometime, we can encounter artifacts of bogus DWARF that
@@ -13112,7 +13181,7 @@  struct redundancy_marking_visitor : public diff_node_visitor
 		    continue;
 		  if (sib->get_canonical_diff() == d->get_canonical_diff()
 		      // Sibbling diff nodes that carry base type
-		      // changes ar to be marked as redundant.
+		      // changes are to be marked as redundant.
 		      && (is_base_diff(sib) || is_distinct_diff(sib)))
 		    {
 		      redundant_with_sibling_node = true;
@@ -13206,9 +13275,10 @@  struct redundancy_marking_visitor : public diff_node_visitor
 	// doesn't inherit redundancy from its children nodes.
 	if (!(d->get_category() & REDUNDANT_CATEGORY)
 	    && (!d->has_local_changes_to_be_reported()
-		// By default, pointer, reference and qualified types
-		// consider that a local changes to their underlying
-		// type is always a local change for themselves.
+		// By default, pointer, reference, array and qualified
+		// types consider that a local changes to their
+		// underlying type is always a local change for
+		// themselves.
 		//
 		// This is as if those types don't have local changes
 		// in the same sense as other types.  So we always
@@ -13225,6 +13295,7 @@  struct redundancy_marking_visitor : public diff_node_visitor
 		// typedef itself are considered local of
 		// LOCAL_NON_TYPE_CHANGE_KIND kind.
 		|| is_pointer_diff(d)
+		|| is_array_diff(d)
 		|| is_qualified_type_diff(d)
 		// A typedef with local non-type changes should not
 		// see redundancy propagation from its underlying
@@ -13255,6 +13326,7 @@  struct redundancy_marking_visitor : public diff_node_visitor
 	  {
 	    bool has_non_redundant_child = false;
 	    bool has_non_empty_child = false;
+	    bool is_array_diff_node = is_array_diff(d);
 	    for (vector<diff*>::const_iterator i =
 		   d->children_nodes().begin();
 		 i != d->children_nodes().end();
@@ -13262,7 +13334,16 @@  struct redundancy_marking_visitor : public diff_node_visitor
 	      {
 		if ((*i)->has_changes())
 		  {
-		    has_non_empty_child = true;
+		    // If we are looking at a child node of an array,
+		    // do not take a subrange diff node change into
+		    // account when considering redundancy.  In other
+		    // words, a subrange diff node that carries a
+		    // change should not be considered as a non-empty
+		    // child node.  This is because we want to report
+		    // all subrange diff node changes and not consider
+		    // them as redundant.
+		    if (!is_array_diff_node || !is_subrange_diff(*i))
+		      has_non_empty_child = true;
 		    // Let's see if the current child node '*i' is
 		    // "non-redundant".
 		    //
diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc
index c999ec35..40f92729 100644
--- a/src/abg-default-reporter.cc
+++ b/src/abg-default-reporter.cc
@@ -829,6 +829,24 @@  default_reporter::report(const array_diff& d, ostream& out,
 					   d.second_array(),
 					   d.context(),
 					   out, indent);
+
+  if (d.any_subrange_diff_to_be_reported())
+    {
+      int subrange_index = 0;
+      for (const auto& subrange_diff : d.subrange_diffs())
+	{
+	  ++subrange_index;
+	  if (subrange_diff->to_be_reported())
+	    {
+	      out << indent << "array subrange ";
+	      if (d.subrange_diffs().size() > 1)
+		out << subrange_index << " ";
+	      out  << "changed: \n";
+	      subrange_diff->report(out, indent + "  ");
+	    }
+	}
+    }
+
 }
 
 /// Generates a report for an intance of @ref base_diff.
diff --git a/src/abg-ir-priv.h b/src/abg-ir-priv.h
index fa2ca281..026b8fb3 100644
--- a/src/abg-ir-priv.h
+++ b/src/abg-ir-priv.h
@@ -68,7 +68,13 @@  public:
     /// The "char32_t" base type.
     CHAR32_T_BASE_TYPE,
     /// The "wchar_t" base type.
-    WCHAR_T_BASE_TYPE
+    WCHAR_T_BASE_TYPE,
+    SIZE_BASE_TYPE,
+    SSIZE_BASE_TYPE,
+    BIT_SIZE_BASE_TYPE,
+    SBIT_SIZE_BASE_TYPE,
+    /// The aray size type used by Clang.
+    ARRAY_SIZE_BASE_TYPE
   };
 
   /// The modifiers of the base types above.  Several modifiers can be
diff --git a/src/abg-ir.cc b/src/abg-ir.cc
index 6cf1aec9..62d870cd 100644
--- a/src/abg-ir.cc
+++ b/src/abg-ir.cc
@@ -16139,6 +16139,16 @@  parse_base_real_type(const string& type_name,
     base = real_type::CHAR32_T_BASE_TYPE;
   else if (type_name == "wchar_t")
     base = real_type::WCHAR_T_BASE_TYPE;
+  else if (type_name == "__ARRAY_SIZE_TYPE__")
+    base = real_type::ARRAY_SIZE_BASE_TYPE;
+  else if (type_name == "sizetype")
+    base = real_type::SIZE_BASE_TYPE;
+  else if (type_name == "ssizetype")
+    base = real_type::SSIZE_BASE_TYPE;
+  else if (type_name == "bitsizetype")
+    base = real_type::BIT_SIZE_BASE_TYPE;
+  else if (type_name == "sbitsizetype")
+    base = real_type::SBIT_SIZE_BASE_TYPE;
   else
     return false;
 
@@ -16353,7 +16363,16 @@  real_type::to_string(bool internal) const
     result += "char32_t";
     else if (base_ == WCHAR_T_BASE_TYPE)
     result += "wchar_t";
-
+    else if (base_ == ARRAY_SIZE_BASE_TYPE)
+      result += "__ARRAY_SIZE_TYPE__";
+    else if (base_ == SIZE_BASE_TYPE)
+      result += "sizetype";
+    else if (base_ == SSIZE_BASE_TYPE)
+      result += "ssizetype";
+    else if (base_ == BIT_SIZE_BASE_TYPE)
+      result += "bitsizetype";
+    else if (base_ == SBIT_SIZE_BASE_TYPE)
+      result += "sbitsizetype";
   return result;
 }
 
@@ -18935,6 +18954,17 @@  equals(const array_type_def::subrange_type& l,
 	ABG_RETURN(result);
     }
 
+  if (l.get_underlying_type()
+      && r.get_underlying_type()
+      && (*l.get_underlying_type() != *r.get_underlying_type()))
+    {
+      result = false;
+      if (k)
+	*k |= SUBTYPE_CHANGE_KIND;
+      else
+	ABG_RETURN(result);
+    }
+
   ABG_RETURN(result);
 }
 
@@ -19233,7 +19263,7 @@  equals(const array_type_def& l, const array_type_def& r, change_kind* k)
     {
       result = false;
       if (k)
-	*k |= LOCAL_TYPE_CHANGE_KIND;
+	*k |= LOCAL_NON_TYPE_CHANGE_KIND;
       else
 	ABG_RETURN_FALSE;
     }
@@ -19247,7 +19277,7 @@  equals(const array_type_def& l, const array_type_def& r, change_kind* k)
 	result = false;
 	if (k)
 	  {
-	    *k |= LOCAL_TYPE_CHANGE_KIND;
+	    *k |= LOCAL_NON_TYPE_CHANGE_KIND;
 	    break;
 	  }
 	else
diff --git a/src/abg-reporter-priv.cc b/src/abg-reporter-priv.cc
index daeda711..6b52aed5 100644
--- a/src/abg-reporter-priv.cc
+++ b/src/abg-reporter-priv.cc
@@ -746,7 +746,7 @@  represent(const subrange_diff&		d,
   int64_t oub = o->get_upper_bound();
   int64_t nub = n->get_upper_bound();
 
-    if (on != nn)
+  if (on != nn)
     {
       out << indent << "name of range changed from '"
 	  << on << "' to '" << nn << "'\n";
@@ -754,9 +754,7 @@  represent(const subrange_diff&		d,
 
   if (olb != nlb)
     {
-      out << indent << "lower bound of range '"
-	  << on
-	  << "' change from '";
+      out << indent << "lower bound of '" << oor << "' change from '";
       emit_num_value(olb, *ctxt, out);
       out << "' to '";
       emit_num_value(nlb, *ctxt, out);
@@ -765,15 +763,30 @@  represent(const subrange_diff&		d,
 
   if (oub != nub)
     {
-      out << indent << "upper bound of range '"
-	  << on
-	  << "' change from '";
+      out << indent << "upper bound of '" << nr  << "' change from '";
       emit_num_value(oub, *ctxt, out);
       out << "' to '";
       emit_num_value(nub, *ctxt, out);
       out << "'\n";
     }
 
+  if (o->is_non_finite() != n->is_non_finite())
+    {
+      out << indent
+	  << (o->is_non_finite()
+	      ? string("unknown sized")
+	      : string("known sized"))
+	  << string(" range '")
+	  << oor
+	  << string("' changed to ")
+	  << (n->is_non_finite()
+	      ? string("unknown sized")
+	      : string("known sized"))
+	  << string(" range '")
+	  << nr
+	  << "'\n";
+    }
+
   if (!local_only)
     {
       diff_sptr dif = d.underlying_type_diff();
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
index 8b2bc4c5..86abfb9e 100644
--- 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
@@ -8,8 +8,10 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
       type name changed from 'test1__my_int[6]' to 'test1__my_int[7]'
       array type size changed from 96 to 112
       array type subrange 1 changed length from 6 to 7
+      array subrange changed: 
+        upper bound of '<anonymous range>[7]' change from '5' to '6'
 
   [C] 'function test1__my_index test1__second_function(void)' 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'
+      upper bound of '<range test1__my_index>[7]' 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
index 29c30481..5a07659b 100644
--- 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
@@ -13,7 +13,7 @@  Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
 
   [C] 'function test1__my_index test1__second_function(void)' 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'
+      upper bound of '<range test1__my_index>[7]' change from '5' to '6'
 
 '<range test1__my_index>[6]' changed:
-  upper bound of range 'test1__my_index' change from '5' to '6'
+  upper bound of '<range test1__my_index>[7]' change from '5' to '6'
diff --git a/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt b/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt
index 2fd51473..c3cf07bb 100644
--- a/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt
+++ b/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt
@@ -8,10 +8,14 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
       type name changed from 'test__my_int[101]' to 'test__my_int[201]'
       array type size changed from 1616 to 3216
       array type subrange 1 changed length from 101 to 201
+      array subrange changed: 
+        upper bound of '<anonymous range>[201]' change from '100' to '200'
+        underlying type of range '<anonymous range>[101]' changed:
+          type size changed from 8 to 16 (in bits)
 
   [C] 'function test__my_index test__second_function(const test__my_index)' at test.adb:12:1 has some indirect sub-type changes:
     return type changed:
-      upper bound of range 'test__my_index' change from '100' to '200'
+      upper bound of '<range test__my_index>[201]' change from '100' to '200'
       underlying type of range '<range test__my_index>[101]' changed:
         type size changed from 8 to 16 (in bits)
 
diff --git a/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt b/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt
index f9d75049..f24366d7 100644
--- a/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt
+++ b/tests/data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt
@@ -13,12 +13,12 @@  Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
 
   [C] 'function test__my_index test__second_function(const test__my_index)' at test.adb:12:1 has some sub-type changes:
     return type changed:
-      upper bound of range 'test__my_index' change from '100' to '200'
+      upper bound of '<range test__my_index>[201]' change from '100' to '200'
     parameter 1 of type 'const test__my_index' changed:
       in unqualified underlying type '<range test__my_index>[101]':
-        upper bound of range 'test__my_index' change from '100' to '200'
+        upper bound of '<range test__my_index>[201]' change from '100' to '200'
 
 'test__Tmy_indexB' changed:
   type size changed from 8 to 16 (in bits)
 '<range test__my_index>[101]' changed:
-  upper bound of range 'test__my_index' change from '100' to '200'
+  upper bound of '<range test__my_index>[201]' change from '100' to '200'
diff --git a/tests/data/test-abidiff-exit/test-allow-type-array-v0--v1-report-1.txt b/tests/data/test-abidiff-exit/test-allow-type-array-v0--v1-report-1.txt
index 36987f27..f4324c0a 100644
--- a/tests/data/test-abidiff-exit/test-allow-type-array-v0--v1-report-1.txt
+++ b/tests/data/test-abidiff-exit/test-allow-type-array-v0--v1-report-1.txt
@@ -14,6 +14,8 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
             type name changed from 'char[50]' to 'char[46]'
             array type size changed from 400 to 368
             array type subrange 1 changed length from 50 to 46
+            array subrange changed: 
+              upper bound of '<anonymous range>[46]' change from '49' to '45'
           and offset changed from 64 to 96 (in bits) (by +32 bits)
     parameter 2 of type 'C1*' has sub-type changes:
       in pointed to type 'struct C1' at test-allow-type-array-v1.c:9:1:
diff --git a/tests/data/test-abidiff-exit/test-allow-type-array-v0--v3-report-1.txt b/tests/data/test-abidiff-exit/test-allow-type-array-v0--v3-report-1.txt
index b0e1d85c..f00349e7 100644
--- a/tests/data/test-abidiff-exit/test-allow-type-array-v0--v3-report-1.txt
+++ b/tests/data/test-abidiff-exit/test-allow-type-array-v0--v3-report-1.txt
@@ -14,6 +14,8 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
             type name changed from 'char[50]' to 'char[46]'
             array type size changed from 400 to 368
             array type subrange 1 changed length from 50 to 46
+            array subrange changed: 
+              upper bound of '<anonymous range>[46]' change from '49' to '45'
           and offset changed from 64 to 96 (in bits) (by +32 bits)
     parameter 2 of type 'C1*' has sub-type changes:
       in pointed to type 'struct C1' at test-allow-type-array-v3.c:9:1:
diff --git a/tests/data/test-abidiff/test-PR27985-report.txt b/tests/data/test-abidiff/test-PR27985-report.txt
index 9e741f91..05d8d63b 100644
--- a/tests/data/test-abidiff/test-PR27985-report.txt
+++ b/tests/data/test-abidiff/test-PR27985-report.txt
@@ -16,4 +16,6 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
                   type name changed from 'int[2]' to 'int[3]'
                   array type size changed from 64 to 96
                   array type subrange 1 changed length from 2 to 3
+                  array subrange changed: 
+                    upper bound of '<anonymous range>[3]' change from '1' to '2'
 
diff --git a/tests/data/test-diff-dwarf/test10-report.txt b/tests/data/test-diff-dwarf/test10-report.txt
index a88febd3..82736e8a 100644
--- a/tests/data/test-diff-dwarf/test10-report.txt
+++ b/tests/data/test-diff-dwarf/test10-report.txt
@@ -12,6 +12,8 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
             type name changed from 'int[5][3]' to 'int[5][4]'
             array type size changed from 480 to 640
             array type subrange 2 changed length from 3 to 4
+            array subrange 2 changed: 
+              upper bound of '<anonymous range>[4]' change from '2' to '3'
           type of 'int* m1[10]' changed:
             array element type 'int*' changed:
               in pointed to type 'int':
diff --git a/tests/data/test-diff-dwarf/test11-report.txt b/tests/data/test-diff-dwarf/test11-report.txt
index 59bec93f..793d6054 100644
--- a/tests/data/test-diff-dwarf/test11-report.txt
+++ b/tests/data/test-diff-dwarf/test11-report.txt
@@ -12,9 +12,13 @@  Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
             type name changed from 'int[5][3]' to 'int[6][3]'
             array type size changed from 480 to 576
             array type subrange 1 changed length from 5 to 6
+            array subrange 1 changed: 
+              upper bound of '<anonymous range>[6]' change from '4' to '5'
           type of 'int m1[6][4]' changed:
             type name changed from 'int[6][4]' to 'int[6][5]'
             array type size changed from 768 to 960
             array type subrange 2 changed length from 4 to 5
+            array subrange 2 changed: 
+              upper bound of '<anonymous range>[5]' change from '3' to '4'
           and offset changed from 480 to 576 (in bits) (by +96 bits)
 
diff --git a/tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-clang-report-0.txt b/tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-clang-report-0.txt
index 535ddb94..3f0acd1a 100644
--- a/tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-clang-report-0.txt
+++ b/tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-clang-report-0.txt
@@ -9,4 +9,6 @@  Variables changes summary: 0 Removed, 1 Changed, 0 Added variable
       type name changed from 'char[5]' to 'char[10]'
       array type size changed from 40 to 80
       array type subrange 1 changed length from 5 to 10
+      array subrange changed: 
+        upper bound of '<anonymous range>[10]' change from '4' to '9'
 
diff --git a/tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-gcc-report-0.txt b/tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-gcc-report-0.txt
index 535ddb94..3f0acd1a 100644
--- a/tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-gcc-report-0.txt
+++ b/tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-gcc-report-0.txt
@@ -9,4 +9,6 @@  Variables changes summary: 0 Removed, 1 Changed, 0 Added variable
       type name changed from 'char[5]' to 'char[10]'
       array type size changed from 40 to 80
       array type subrange 1 changed length from 5 to 10
+      array subrange changed: 
+        upper bound of '<anonymous range>[10]' change from '4' to '9'
 
diff --git a/tests/data/test-diff-filter/PR24430-fold-qualified-array-report-0.txt b/tests/data/test-diff-filter/PR24430-fold-qualified-array-report-0.txt
index e69de29b..9666a8fd 100644
--- a/tests/data/test-diff-filter/PR24430-fold-qualified-array-report-0.txt
+++ b/tests/data/test-diff-filter/PR24430-fold-qualified-array-report-0.txt
@@ -0,0 +1,3 @@ 
+Functions changes summary: 0 Removed, 0 Changed (1 filtered out), 0 Added function
+Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
+
diff --git a/tests/data/test-diff-filter/test-PR29811-0-report-1.txt b/tests/data/test-diff-filter/test-PR29811-0-report-1.txt
index 26eddf3f..a64839af 100644
--- a/tests/data/test-diff-filter/test-PR29811-0-report-1.txt
+++ b/tests/data/test-diff-filter/test-PR29811-0-report-1.txt
@@ -10,4 +10,8 @@  Variables changes summary: 0 Removed, 1 Changed, 0 Added variable
       type name changed from 'unsigned int[]' to 'unsigned int[1]'
       array type size changed from 'unknown' to 32
       array type subrange 1 changed length from 'unknown' to 1
+      array subrange changed: 
+        unknown sized range '<anonymous range>[]' changed to known sized range '<anonymous range>[1]'
+        underlying type of range '<anonymous range>[]' changed:
+          entity changed from ''void'' to 'unsigned long int'
 
diff --git a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt
index b965af78..aef63449 100644
--- a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt
+++ b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt
@@ -1232,6 +1232,8 @@  Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen
             type name changed from 'coifunction*[6]' to 'coifunction*[7]'
             array type size changed from 384 to 448
             array type subrange 1 changed length from 6 to 7
+            array subrange changed: 
+              upper bound of '<anonymous range>[7]' change from '5' to '6'
           and offset changed from 2368 to 5056 (in bits) (by +2688 bits)
 
   [C] 'method void OffloadDescriptor::cleanup()' has some indirect sub-type changes:
diff --git a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt
index 1088a2ef..20a106cc 100644
--- a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt
+++ b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt
@@ -1232,6 +1232,8 @@  Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen
             type name changed from 'coifunction*[6]' to 'coifunction*[7]'
             array type size changed from 384 to 448
             array type subrange 1 changed length from 6 to 7
+            array subrange changed: 
+              upper bound of '<anonymous range>[7]' change from '5' to '6'
           and offset changed from 2368 to 5056 (in bits) (by +2688 bits)
 
   [C] 'method void OffloadDescriptor::cleanup()' at offload_host.cpp:2294:1 has some indirect sub-type changes:
diff --git a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt
index 577aa2da..258d6c6e 100644
--- a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt
+++ b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt
@@ -1232,6 +1232,8 @@  Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen
             type name changed from 'coifunction*[6]' to 'coifunction*[7]'
             array type size changed from 0x180 to 0x1c0
             array type subrange 1 changed length from 6 to 7
+            array subrange changed: 
+              upper bound of '<anonymous range>[7]' change from '0x5' to '0x6'
           and offset changed from 0x128 to 0x278 (in bytes) (by +0x150 bytes)
 
   [C] 'method void OffloadDescriptor::cleanup()' at offload_host.cpp:2294:1 has some indirect sub-type changes:
diff --git a/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt b/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt
index b2d3ec65..86e64600 100644
--- a/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt
+++ b/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt
@@ -148,6 +148,8 @@  Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen
             type name changed from 'coifunction*[6]' to 'coifunction*[7]'
             array type size changed from 384 to 448
             array type subrange 1 changed length from 6 to 7
+            array subrange changed: 
+              upper bound of '<anonymous range>[7]' change from '5' to '6'
           and offset changed from 2368 to 5056 (in bits) (by +2688 bits)
 
   [C] 'method void OffloadDescriptor::cleanup()' has some indirect sub-type changes:
diff --git a/tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt b/tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt
index 0970221c..9d74bfe2 100644
--- a/tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt
+++ b/tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt
@@ -1,6 +1,6 @@ 
 ================ changes of 'libICE.so.6.3.0'===============
-  Functions changes summary: 0 Removed, 1 Changed (100 filtered out), 3 Added functions
-  Variables changes summary: 0 Removed, 1 Changed (13 filtered out), 0 Added variables
+  Functions changes summary: 0 Removed, 1 Changed (102 filtered out), 3 Added functions
+  Variables changes summary: 0 Removed, 1 Changed (15 filtered out), 0 Added variables
 
   3 Added functions:
 
diff --git a/tests/data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt b/tests/data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt
index cc7079e9..baa151cb 100644
--- a/tests/data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt
+++ b/tests/data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt
@@ -64,6 +64,8 @@ 
         type name changed from 'const PRUint16[74]' to 'const PRUint16[69]'
         array type size changed from 1184 to 1104
         array type subrange 1 changed length from 74 to 69
+        array subrange changed: 
+          upper bound of '<anonymous range>[69]' change from '73' to '68'
 
 ================ end of changes of 'libssl3.so'===============
 
diff --git a/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt b/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt
index 89f4819d..afdd4d30 100644
--- a/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt
+++ b/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt
@@ -42,6 +42,8 @@ 
                       type name changed from 'char[80]' to 'char[72]'
                       array type size changed from 640 to 576
                       array type subrange 1 changed length from 80 to 72
+                      array subrange changed: 
+                        upper bound of '<anonymous range>[72]' change from '79' to '71'
                     type of 'generic_scheduler* my_owner' changed:
                       in pointed to type 'class tbb::internal::generic_scheduler' at scheduler.h:110:1:
                         type size changed from 3136 to 3072 (in bits)
diff --git a/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt b/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt
index 84f1c47d..1039ecaf 100644
--- a/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt
+++ b/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt
@@ -42,6 +42,8 @@ 
                       type name changed from 'char[80]' to 'char[72]'
                       array type size changed from 640 to 576
                       array type subrange 1 changed length from 80 to 72
+                      array subrange changed: 
+                        upper bound of '<anonymous range>[72]' change from '79' to '71'
 
     [C] 'function void tbb::internal::throw_exception_v4(tbb::internal::exception_id)' at tbb_misc.cpp:126:1 has some indirect sub-type changes:
       parameter 1 of type 'enum tbb::internal::exception_id' has sub-type changes:
diff --git a/tests/data/test-diff-suppr/test-has-data-member-inserted-at-1-report-1.txt b/tests/data/test-diff-suppr/test-has-data-member-inserted-at-1-report-1.txt
index d0fac818..dc7a6aff 100644
--- a/tests/data/test-diff-suppr/test-has-data-member-inserted-at-1-report-1.txt
+++ b/tests/data/test-diff-suppr/test-has-data-member-inserted-at-1-report-1.txt
@@ -13,5 +13,7 @@  Unreachable types summary: 0 removed, 1 changed, 0 added type
         type name changed from 'char[8]' to 'char[4]'
         array type size changed from 64 to 32
         array type subrange 1 changed length from 8 to 4
+        array subrange changed: 
+          upper bound of '<anonymous range>[4]' change from '7' to '3'
       and offset changed from 0 to 32 (in bits) (by +32 bits)
 
diff --git a/tests/data/test-diff-suppr/test-has-strict-flexible-array-data-member-conversion-report-2.txt b/tests/data/test-diff-suppr/test-has-strict-flexible-array-data-member-conversion-report-2.txt
index 2352dd4e..8a6e7286 100644
--- a/tests/data/test-diff-suppr/test-has-strict-flexible-array-data-member-conversion-report-2.txt
+++ b/tests/data/test-diff-suppr/test-has-strict-flexible-array-data-member-conversion-report-2.txt
@@ -11,4 +11,6 @@  Unreachable types summary: 0 removed, 1 changed, 0 added type
         type name changed from 'int[1]' to 'int[]'
         array type size changed from 32 to 'unknown'
         array type subrange 1 changed length from 1 to 'unknown'
+        array subrange changed: 
+          known sized range '<anonymous range>[1]' changed to unknown sized range '<anonymous range>[]'