diff --git a/src/abg-ir.cc b/src/abg-ir.cc
index 3b1577a8..2cb76ffc 100644
--- a/src/abg-ir.cc
+++ b/src/abg-ir.cc
@@ -22745,25 +22745,25 @@ types_have_similar_structure(const type_base* first, const type_base* second)
   if (const function_type* ty1 = is_function_type(first))
     {
       const function_type* ty2 = is_function_type(second);
-      if (!was_indirect_type)
-	{
-	  if (!types_have_similar_structure(ty1->get_return_type(),
-					    ty2->get_return_type()))
-	    return false;
+      if (!ty2)
+	return false;
 
-	  if (ty1->get_parameters().size() != ty2->get_parameters().size())
-	    return false;
+      if (!types_have_similar_structure(ty1->get_return_type(),
+					ty2->get_return_type()))
+	return false;
 
-	  for (function_type::parameters::const_iterator
-		 i = ty1->get_parameters().begin(),
-		 j = ty2->get_parameters().begin();
-	       (i != ty1->get_parameters().end()
-		&& j != ty2->get_parameters().end());
-	       ++i, ++j)
-	    if (!types_have_similar_structure((*i)->get_type(),
-					      (*j)->get_type()))
-	      return false;
-	}
+      if (ty1->get_parameters().size() != ty2->get_parameters().size())
+	return false;
+
+      for (function_type::parameters::const_iterator
+	     i = ty1->get_parameters().begin(),
+	     j = ty2->get_parameters().begin();
+	   (i != ty1->get_parameters().end()
+	    && j != ty2->get_parameters().end());
+	   ++i, ++j)
+	if (!types_have_similar_structure((*i)->get_type(),
+					  (*j)->get_type()))
+	  return false;
 
       return true;
     }
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index bf76ca2e..3b4b614b 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -120,6 +120,11 @@ test-abidiff-exit/test-leaf1-v0.o \
 test-abidiff-exit/test-leaf1-v1.cc \
 test-abidiff-exit/test-leaf1-v1.o \
 test-abidiff-exit/test-leaf1-report.txt \
+test-abidiff-exit/test-leaf2-v0.cc \
+test-abidiff-exit/test-leaf2-v0.o \
+test-abidiff-exit/test-leaf2-v1.cc \
+test-abidiff-exit/test-leaf2-v1.o \
+test-abidiff-exit/test-leaf2-report.txt \
 test-abidiff-exit/test-leaf3-v0.c \
 test-abidiff-exit/test-leaf3-v0.o \
 test-abidiff-exit/test-leaf3-v1.c \
diff --git a/tests/data/test-abidiff-exit/test-leaf2-report.txt b/tests/data/test-abidiff-exit/test-leaf2-report.txt
new file mode 100644
index 00000000..2765b469
--- /dev/null
+++ b/tests/data/test-abidiff-exit/test-leaf2-report.txt
@@ -0,0 +1,12 @@
+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 ops' changed:
+  type size hasn't changed
+  there are data member changes:
+    type 'void (int)*' of 'ops::munge' changed:
+      pointer type changed from: 'void (int)*' to: 'char (long int, bool)*'
+
+
diff --git a/tests/data/test-abidiff-exit/test-leaf2-v0.cc b/tests/data/test-abidiff-exit/test-leaf2-v0.cc
new file mode 100644
index 00000000..b75dd84c
--- /dev/null
+++ b/tests/data/test-abidiff-exit/test-leaf2-v0.cc
@@ -0,0 +1,6 @@
+struct ops {
+  void (*munge)(int x);
+};
+
+void register_ops(const ops&) {
+}
diff --git a/tests/data/test-abidiff-exit/test-leaf2-v0.o b/tests/data/test-abidiff-exit/test-leaf2-v0.o
new file mode 100644
index 0000000000000000000000000000000000000000..211a33884f30755929210fee5d328e5b7e6c24e1
GIT binary patch
diff --git a/tests/data/test-abidiff-exit/test-leaf2-v1.cc b/tests/data/test-abidiff-exit/test-leaf2-v1.cc
new file mode 100644
index 00000000..f308a343
--- /dev/null
+++ b/tests/data/test-abidiff-exit/test-leaf2-v1.cc
@@ -0,0 +1,6 @@
+struct ops {
+  char (*munge)(long x, bool gunk);
+};
+
+void register_ops(const ops&) {
+}
diff --git a/tests/data/test-abidiff-exit/test-leaf2-v1.o b/tests/data/test-abidiff-exit/test-leaf2-v1.o
new file mode 100644
index 0000000000000000000000000000000000000000..9db3ed5e8f997d9c8455f8361449ce516edc840a
GIT binary patch
diff --git a/tests/test-abidiff-exit.cc b/tests/test-abidiff-exit.cc
index 45258a9f..6b91e833 100644
--- a/tests/test-abidiff-exit.cc
+++ b/tests/test-abidiff-exit.cc
@@ -139,6 +139,15 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-leaf1-report.txt",
     "output/test-abidiff-exit/test-leaf1-report.txt"
   },
+  {
+    "data/test-abidiff-exit/test-leaf2-v0.o",
+    "data/test-abidiff-exit/test-leaf2-v1.o",
+    "",
+    "--no-show-locs --leaf-changes-only",
+    abigail::tools_utils::ABIDIFF_ABI_CHANGE,
+    "data/test-abidiff-exit/test-leaf2-report.txt",
+    "output/test-abidiff-exit/test-leaf2-report.txt"
+  },
   {
     "data/test-abidiff-exit/test-leaf3-v0.o",
     "data/test-abidiff-exit/test-leaf3-v1.o",
