public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix oversight in call gimplification
@ 2014-05-08 10:56 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2014-05-08 10:56 UTC (permalink / raw)
  To: gcc-patches


When gimplifying a call we now remember the original function type
used and record it in gimple_call_fntype.  But we fail to use
exactly that type for looking at TYPE_ARG_TYPES.  The following
fixes that.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2014-05-08  Richard Biener  <rguenther@suse.de>

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

Index: gcc/gimplify.c
===================================================================
--- gcc/gimplify.c	(revision 210207)
+++ gcc/gimplify.c	(working copy)
@@ -2329,8 +2329,8 @@ gimplify_call_expr (tree *expr_p, gimple
   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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-08 10:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-08 10:56 [PATCH] Fix oversight in call gimplification Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).