diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc
index af4cd5e7..61aea47f 100644
--- a/src/abg-comparison.cc
+++ b/src/abg-comparison.cc
@@ -9767,8 +9767,8 @@ corpus_diff::priv::apply_filters_and_compute_diff_stats(diff_stats& stat)
 	      (stat.num_leaf_var_changes_filtered_out() + 1);
 	}
       if ((*i)->has_local_changes())
-	stat.num_leaf_func_changes
-	  (stat.num_leaf_func_changes() + 1);
+	stat.num_leaf_var_changes
+	  (stat.num_leaf_var_changes() + 1);
     }
 
   stat.num_func_syms_added(added_unrefed_fn_syms_.size());
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 1f574d2e..2a928ef2 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -107,6 +107,9 @@ test-abidiff-exit/test-loc-v0.bi \
 test-abidiff-exit/test-loc-v1.bi \
 test-abidiff-exit/test-loc-with-locs-report.txt \
 test-abidiff-exit/test-loc-without-locs-report.txt \
+test-abidiff-exit/test-leaf0-v0.o \
+test-abidiff-exit/test-leaf0-v1.o \
+test-abidiff-exit/test-leaf0.report.txt \
 \
 test-diff-dwarf/test0-v0.cc		\
 test-diff-dwarf/test0-v0.o			\
diff --git a/tests/data/test-abidiff-exit/test-leaf0-report.txt b/tests/data/test-abidiff-exit/test-leaf0-report.txt
new file mode 100644
index 00000000..46f39976
--- /dev/null
+++ b/tests/data/test-abidiff-exit/test-leaf0-report.txt
@@ -0,0 +1,13 @@
+Leaf changes summary: 2 artifacts changed
+Changed leaf types summary: 0 leaf type changed
+Removed/Changed/Added functions summary: 0 Removed, 1 Changed, 0 Added function
+Removed/Changed/Added variables summary: 0 Removed, 1 Changed, 0 Added variable
+
+1 function with some sub-type change:
+
+  [C]'function int changed_fun()' has some sub-type changes:
+    return type changed:
+      type name changed from 'int' to 'long int'
+      type size changed from 32 to 64 (in bits)
+
+
diff --git a/tests/data/test-abidiff-exit/test-leaf0-v0.o b/tests/data/test-abidiff-exit/test-leaf0-v0.o
new file mode 100644
index 0000000000000000000000000000000000000000..a79511cc3c6db039aaa1f5528db19b55f75c7a2d
GIT binary patch
diff --git a/tests/data/test-abidiff-exit/test-leaf0-v1.o b/tests/data/test-abidiff-exit/test-leaf0-v1.o
new file mode 100644
index 0000000000000000000000000000000000000000..4a433b9572abb46799391619f21538b54fb3204c
GIT binary patch
diff --git a/tests/test-abidiff-exit.cc b/tests/test-abidiff-exit.cc
index 4cef727e..bafa7400 100644
--- a/tests/test-abidiff-exit.cc
+++ b/tests/test-abidiff-exit.cc
@@ -111,6 +111,15 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-loc-without-locs-report.txt",
     "output/test-abidiff-exit/test-loc-without-locs-report.txt"
   },
+  {
+    "data/test-abidiff-exit/test-leaf0-v0.o",
+    "data/test-abidiff-exit/test-leaf0-v1.o",
+    "",
+    "--no-show-locs --leaf-changes-only",
+    abigail::tools_utils::ABIDIFF_ABI_CHANGE,
+    "data/test-abidiff-exit/test-leaf0-report.txt",
+    "output/test-abidiff-exit/test-leaf0-report.txt"
+  },
   {0, 0, 0 ,0,  abigail::tools_utils::ABIDIFF_OK, 0, 0}
 };
 
