Assert for POINTER_TYPE_P in expr_callee_abi
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 16 Oct 2019 10:58:55 +0000 (10:58 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 16 Oct 2019 10:58:55 +0000 (10:58 +0000)
2019-10-16  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* function-abi.cc (expr_callee_abi): Assert for POINTER_TYPE_P.

From-SVN: r277063

gcc/ChangeLog
gcc/function-abi.cc

index 56ad96db752a6ebd7d243909cc92c166be10065d..1a03ac2dc0500c7a030483aae7ff9444d5b00b00 100644 (file)
@@ -1,3 +1,7 @@
+2019-10-16  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * function-abi.cc (expr_callee_abi): Assert for POINTER_TYPE_P.
+
 2019-10-16  Richard Sandiford  <richard.sandiford@arm.com>
 
        * genmodes.c (mode_data::order): New field.
index b4a18396367da24e953ed60b5197b52b574570e4..2c23b4936bf79670a53d29ba267ee69952fa778b 100644 (file)
@@ -249,12 +249,6 @@ expr_callee_abi (const_tree exp)
   if (type == error_mark_node)
     return default_function_abi;
 
-  if (POINTER_TYPE_P (type))
-    {
-      type = TREE_TYPE (type);
-      if (type == error_mark_node)
-       return default_function_abi;
-    }
-
-  return fntype_abi (type);
+  gcc_assert (POINTER_TYPE_P (type));
+  return fntype_abi (TREE_TYPE (type));
 }