gimplify.c (gimplify_call_expr): Use saved fnptrtype for looking at TYPE_ARG_TYPES.
authorRichard Biener <rguenther@suse.de>
Thu, 8 May 2014 10:57:53 +0000 (10:57 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 8 May 2014 10:57:53 +0000 (10:57 +0000)
2014-05-08  Richard Biener  <rguenther@suse.de>

* gimplify.c (gimplify_call_expr): Use saved fnptrtype for
looking at TYPE_ARG_TYPES.

From-SVN: r210209

gcc/ChangeLog
gcc/gimplify.c

index 3521329..34ccf5f 100644 (file)
@@ -1,5 +1,10 @@
 2014-05-08  Richard Biener  <rguenther@suse.de>
 
+       * gimplify.c (gimplify_call_expr): Use saved fnptrtype for
+       looking at TYPE_ARG_TYPES.
+
+2014-05-08  Richard Biener  <rguenther@suse.de>
+
        * gimple-fold.c (gimple_fold_stmt_to_constant_1): Remove
        pointer propagation special-case.
 
index 37c3778..be4d719 100644 (file)
@@ -2329,8 +2329,8 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
   parms = NULL_TREE;
   if (fndecl)
     parms = TYPE_ARG_TYPES (TREE_TYPE (fndecl));
-  else if (POINTER_TYPE_P (TREE_TYPE (CALL_EXPR_FN (*expr_p))))
-    parms = TYPE_ARG_TYPES (TREE_TYPE (TREE_TYPE (CALL_EXPR_FN (*expr_p))));
+  else
+    parms = TYPE_ARG_TYPES (TREE_TYPE (fnptrtype));
 
   if (fndecl && DECL_ARGUMENTS (fndecl))
     p = DECL_ARGUMENTS (fndecl);