SOURCES (GCC_4_1): gcc-pr22533.patch - new version.

pluto pluto at pld-linux.org
Thu Dec 22 22:12:17 CET 2005


Author: pluto                        Date: Thu Dec 22 21:12:15 2005 GMT
Module: SOURCES                       Tag: GCC_4_1
---- Log message:
- new version.

---- Files affected:
SOURCES:
   gcc-pr22533.patch (1.5 -> 1.5.2.1) 

---- Diffs:

================================================================
Index: SOURCES/gcc-pr22533.patch
diff -u SOURCES/gcc-pr22533.patch:1.5 SOURCES/gcc-pr22533.patch:1.5.2.1
--- SOURCES/gcc-pr22533.patch:1.5	Thu Nov 24 15:43:18 2005
+++ SOURCES/gcc-pr22533.patch	Thu Dec 22 22:12:10 2005
@@ -1,150 +1,22 @@
---- gcc/gcc/ada/trans.c	(revision 107434)
-+++ gcc/gcc/ada/trans.c	(working copy)
-@@ -4570,7 +4570,6 @@ int
- gnat_gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p ATTRIBUTE_UNUSED)
- {
-   tree expr = *expr_p;
--  tree op;
- 
-   if (IS_ADA_STMT (expr))
-     return gnat_gimplify_stmt (expr_p);
-@@ -4600,53 +4599,6 @@ gnat_gimplify_expr (tree *expr_p, tree *
-       *expr_p = TREE_OPERAND (*expr_p, 0);
-       return GS_OK;
- 
--    case ADDR_EXPR:
--      op = TREE_OPERAND (expr, 0);
--
--      /* If we're taking the address of a constant CONSTRUCTOR, force it to
--	 be put into static memory.  We know it's going to be readonly given
--	 the semantics we have and it's required to be static memory in
--	 the case when the reference is in an elaboration procedure.   */
--      if (TREE_CODE (op) == CONSTRUCTOR && TREE_CONSTANT (op))
--	{
--	  tree new_var = create_tmp_var (TREE_TYPE (op), "C");
--
--	  TREE_READONLY (new_var) = 1;
--	  TREE_STATIC (new_var) = 1;
--	  TREE_ADDRESSABLE (new_var) = 1;
--	  DECL_INITIAL (new_var) = op;
--
--	  TREE_OPERAND (expr, 0) = new_var;
--	  recompute_tree_invarant_for_addr_expr (expr);
--	  return GS_ALL_DONE;
--	}
--
--      /* Otherwise, if we are taking the address of something that is neither
--	 reference, declaration, or constant, make a variable for the operand
--	 here and then take its address.  If we don't do it this way, we may
--	 confuse the gimplifier because it needs to know the variable is
--	 addressable at this point.  This duplicates code in
--	 internal_get_tmp_var, which is unfortunate.  */
--      else if (TREE_CODE_CLASS (TREE_CODE (op)) != tcc_reference
--	       && TREE_CODE_CLASS (TREE_CODE (op)) != tcc_declaration
--	       && TREE_CODE_CLASS (TREE_CODE (op)) != tcc_constant)
--	{
--	  tree new_var = create_tmp_var (TREE_TYPE (op), "A");
--	  tree mod = build (MODIFY_EXPR, TREE_TYPE (op), new_var, op);
--
--	  TREE_ADDRESSABLE (new_var) = 1;
--
--	  if (EXPR_HAS_LOCATION (op))
--	    SET_EXPR_LOCUS (mod, EXPR_LOCUS (op));
--
--	  gimplify_and_add (mod, pre_p);
--	  TREE_OPERAND (expr, 0) = new_var;
--	  recompute_tree_invarant_for_addr_expr (expr);
--	  return GS_ALL_DONE;
--	}
--
--      return GS_UNHANDLED;
--
-     case COMPONENT_REF:
-       /* We have a kludge here.  If the FIELD_DECL is from a fat pointer and is
- 	 from an early dummy type, replace it with the proper FIELD_DECL.  */
-@@ -5436,7 +5388,6 @@ addressable_p (tree gnu_expr)
- 
-     case UNCONSTRAINED_ARRAY_REF:
-     case INDIRECT_REF:
--    case CONSTRUCTOR:
-     case NULL_EXPR:
-     case SAVE_EXPR:
-       return true;
---- gcc/gcc/ada/utils2.c	(revision 107414)
-+++ gcc/gcc/ada/utils2.c	(working copy)
-@@ -45,6 +45,8 @@
- #include "einfo.h"
- #include "ada-tree.h"
- #include "gigi.h"
-+#include "tree-gimple.h"
-+#include "toplev.h"
- 
- static tree find_common_type (tree, tree);
- static bool contains_save_expr_p (tree);
-@@ -998,6 +1000,7 @@ build_unary_op (enum tree_code op_code, 
-   tree operation_type = result_type;
-   tree result;
-   bool side_effects = false;
-+  tree before = NULL;
- 
-   if (operation_type
-       && TREE_CODE (operation_type) == RECORD_TYPE
-@@ -1116,6 +1119,22 @@ build_unary_op (enum tree_code op_code, 
- 				result);
- 	      break;
- 	    }
-+	  else
-+	    {
-+	      /* Create a temporary variable to hold the CONSTRUCTON.  */
-+	      tree new_var = create_tmp_var_raw (type, "C");
-+	      TREE_ADDRESSABLE (new_var) = 1;
-+	      TREE_READONLY (new_var) = 1;
-+	      if (global_bindings_p ())
-+		TREE_STATIC (new_var) = 1;
-+	      DECL_INITIAL (new_var) = operand;
-+	      gnat_pushdecl (new_var, Empty);
-+	      if (global_bindings_p ())
-+		rest_of_decl_compilation (new_var, 1, 0);
-+	      else
-+		before = build1 (DECL_EXPR, void_type_node, new_var);
-+	      operand = new_var;
-+	    }
- 
- 	  goto common;
- 
-@@ -1170,6 +1189,9 @@ build_unary_op (enum tree_code op_code, 
- 	}
- 
-       TREE_CONSTANT (result) = staticp (operand) || TREE_CONSTANT (operand);
-+      if (before)
-+        result = build2 (COMPOUND_EXPR, TREE_TYPE (result), before,
-+			      result);
+--- gcc/gcc/ipa-reference.c	(revision 107400)
++++ gcc/gcc/ipa-reference.c	(working copy)
+@@ -550,6 +550,8 @@ scan_for_static_refs (tree *tp, 
+     case ADDR_EXPR:
+       /* This case is here to find addresses on rhs of constructors in
+ 	 decl_initial of static variables. */
++      if (TREE_CODE (TREE_OPERAND (t, 0)) == CONSTRUCTOR)
++	break;
+       check_rhs_var (local, t);
+       *walk_subtrees = 0;
+       break;
+--- gcc/gcc/ipa-type-escape.c	(revision 107400)
++++ gcc/gcc/ipa-type-escape.c	(working copy)
+@@ -1284,6 +1284,8 @@ scan_for_refs (tree *tp, int *walk_subtr
+     case ADDR_EXPR:
+       /* This case is here to find addresses on rhs of constructors in
+ 	 decl_initial of static variables. */
++      if (TREE_CODE (TREE_OPERAND (t, 0)) == CONSTRUCTOR)
++	break;
+       check_rhs_var (t);
+       *walk_subtrees = 0;
        break;
- 
-     case INDIRECT_REF:
-@@ -2003,10 +2025,6 @@ gnat_mark_addressable (tree expr_node)
- 	expr_node = TREE_OPERAND (expr_node, 0);
- 	break;
- 
--      case CONSTRUCTOR:
--	TREE_ADDRESSABLE (expr_node) = 1;
--	return true;
--
-       case VAR_DECL:
-       case PARM_DECL:
-       case RESULT_DECL:
---- gcc/gcc/ada/Makefile.in.orig	2005-11-23 16:48:27.000000000 +0000
-+++ gcc/gcc/ada/Makefile.in	2005-11-24 10:14:25.987115520 +0000
-@@ -1899,6 +1899,12 @@
- 	$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
- 	      $< $(OUTPUT_OPTION)
- 
-+# [Bug ada/22533] [4.1/4.2 regression] Ada ICE during bootstrap on many platforms
-+
-+make.o      : make.adb make.ads
-+	$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 $(ADA_INCLUDES) \
-+	      $< $(OUTPUT_OPTION)
-+
- adadecode.o : adadecode.c adadecode.h
- aux-io.o  : aux-io.c
- argv.o    : argv.c
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/gcc-pr22533.patch?r1=1.5&r2=1.5.2.1&f=u



More information about the pld-cvs-commit mailing list