diff gcc/tree-stdarg.c @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents b7f97abdc517
children 04ced10e8804
line wrap: on
line diff
--- a/gcc/tree-stdarg.c	Tue May 25 18:58:51 2010 +0900
+++ b/gcc/tree-stdarg.c	Tue Mar 22 17:18:12 2011 +0900
@@ -26,7 +26,6 @@
 #include "tree.h"
 #include "function.h"
 #include "langhooks.h"
-#include "diagnostic.h"
 #include "gimple-pretty-print.h"
 #include "target.h"
 #include "tree-flow.h"
@@ -513,7 +512,7 @@
 		  enum tree_code rhs_code = gimple_assign_rhs_code (stmt);
 
 		  /* x = *ap_temp;  */
-		  if (gimple_assign_rhs_code (stmt) == INDIRECT_REF
+		  if (gimple_assign_rhs_code (stmt) == MEM_REF
 		      && TREE_OPERAND (rhs, 0) == use
 		      && TYPE_SIZE_UNIT (TREE_TYPE (rhs))
 		      && host_integerp (TYPE_SIZE_UNIT (TREE_TYPE (rhs)), 1)
@@ -523,6 +522,7 @@
 		      tree access_size = TYPE_SIZE_UNIT (TREE_TYPE (rhs));
 
 		      gpr_size = si->offsets[SSA_NAME_VERSION (use)]
+			  	 + tree_low_cst (TREE_OPERAND (rhs, 1), 0)
 				 + tree_low_cst (access_size, 1);
 		      if (gpr_size >= VA_LIST_MAX_GPR_SIZE)
 			cfun->va_list_gpr_size = VA_LIST_MAX_GPR_SIZE;
@@ -636,7 +636,6 @@
 	      break;
 	      /* If old style builtins are used, don't optimize anything.  */
 	    case BUILT_IN_SAVEREGS:
-	    case BUILT_IN_ARGS_INFO:
 	    case BUILT_IN_NEXT_ARG:
 	      va_list_escapes = true;
 	      continue;