]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Assert for POINTER_TYPE_P in expr_callee_abi
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Oct 2019 10:58:55 +0000 (10:58 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277063 138bc75d-0d04-0410-961f-82ee72b054a4

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));
 }