diff --git a/src/abg-ir.cc b/src/abg-ir.cc
index 02f3cc2..dec85fe 100644
--- a/src/abg-ir.cc
+++ b/src/abg-ir.cc
@@ -19732,7 +19732,8 @@ equals(const class_or_union& l, const class_or_union& r, change_kind* k)
 	    {
 	      // Report any representation change as being local.
 	      if (!types_have_similar_structure((*d0)->get_type(),
-						(*d1)->get_type()))
+						(*d1)->get_type())
+		  || (*d0)->get_type() == (*d1)->get_type())
 		*k |= LOCAL_TYPE_CHANGE_KIND;
 	      else
 		*k |= SUBTYPE_CHANGE_KIND;
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 40ad0e4..68ad902 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -919,6 +919,11 @@ test-diff-filter/test-PR26684-dwarf5.o 	     \
 test-diff-filter/test-PR26684-dwarf4.o       \
 test-diff-filter/test-PR26684.c              \
 test-diff-filter/test-PR26684-report-0.txt   \
+test-diff-filter/test-PR27331-v0.c           \
+test-diff-filter/test-PR27331-v0.o           \
+test-diff-filter/test-PR27331-v1.c           \
+test-diff-filter/test-PR27331-v1.o           \
+test-diff-filter/test-PR27331-report-0.txt   \
 \
 test-diff-suppr/test0-type-suppr-v0.cc	\
 test-diff-suppr/test0-type-suppr-v1.cc	\
diff --git a/tests/data/test-diff-filter/test-PR27331-report-0.txt b/tests/data/test-diff-filter/test-PR27331-report-0.txt
new file mode 100644
index 0000000..8e02a0a
--- /dev/null
+++ b/tests/data/test-diff-filter/test-PR27331-report-0.txt
@@ -0,0 +1,9 @@
+Leaf changes summary: 1 artifact changed
+Changed leaf types summary: 1 leaf type changed
+Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
+Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
+
+'struct S at test-PR27331-v0.c:1:1' changed:
+  type size hasn't changed
+  there are data member changes:
+    'int S::var' offset changed from 0 to 1 (in bits) (by +1 bits)
diff --git a/tests/data/test-diff-filter/test-PR27331-v0.c b/tests/data/test-diff-filter/test-PR27331-v0.c
new file mode 100644
index 0000000..361089b
--- /dev/null
+++ b/tests/data/test-diff-filter/test-PR27331-v0.c
@@ -0,0 +1,4 @@
+struct S {
+  int var : 1;
+};
+int fun(struct S s) { return s.var; }
diff --git a/tests/data/test-diff-filter/test-PR27331-v0.o b/tests/data/test-diff-filter/test-PR27331-v0.o
new file mode 100644
index 0000000000000000000000000000000000000000..d86229db831cfbc709385b50e7726eee83605d3d
GIT binary patch
diff --git a/tests/data/test-diff-filter/test-PR27331-v1.c b/tests/data/test-diff-filter/test-PR27331-v1.c
new file mode 100644
index 0000000..24c2a9a
--- /dev/null
+++ b/tests/data/test-diff-filter/test-PR27331-v1.c
@@ -0,0 +1,4 @@
+struct S {
+  int : 1, var : 1;
+};
+int fun(struct S s) { return s.var; }
diff --git a/tests/data/test-diff-filter/test-PR27331-v1.o b/tests/data/test-diff-filter/test-PR27331-v1.o
new file mode 100644
index 0000000000000000000000000000000000000000..7e35429c17fe030da9185303b769a8dab760eec1
GIT binary patch
diff --git a/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt b/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt
index 3e50dc7..249651f 100644
--- a/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt
+++ b/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt
@@ -1,6 +1,6 @@
 ================ changes of 'libspice-server.so.1.8.0'===============
-Leaf changes summary: 10 artifacts changed (10 filtered out)
-  Changed leaf types summary: 1 (10 filtered out) leaf types changed
+Leaf changes summary: 10 artifacts changed (13 filtered out)
+  Changed leaf types summary: 1 (13 filtered out) leaf types changed
   Removed/Changed/Added functions summary: 1 Removed, 0 Changed, 8 Added functions
   Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
 
diff --git a/tests/test-diff-filter.cc b/tests/test-diff-filter.cc
index 50e2f22..9bc2750 100644
--- a/tests/test-diff-filter.cc
+++ b/tests/test-diff-filter.cc
@@ -780,6 +780,13 @@ InOutSpec in_out_specs[] =
    "data/test-diff-filter/test-PR26684-report-0.txt",
    "output/test-diff-filter/test-PR26684-report-0.txt",
   },
+  {
+   "data/test-diff-filter/test-PR27331-v0.o",
+   "data/test-diff-filter/test-PR27331-v1.o",
+   "--no-default-suppression --leaf-changes-only",
+   "data/test-diff-filter/test-PR27331-report-0.txt",
+   "output/test-diff-filter/test-PR27331-report-0.txt",
+  },
   // This should be the last entry
   {NULL, NULL, NULL, NULL, NULL}
 };
