]> gcc.gnu.org Git - gcc.git/commitdiff
re PR lto/52178 (Ada bootstrap failure in LTO mode)
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 25 May 2012 20:26:11 +0000 (20:26 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 25 May 2012 20:26:11 +0000 (20:26 +0000)
PR lto/52178
* tree-inline.c (remap_gimple_op_r): Fix handling of FIELD_DECL.
* tree.c (RETURN_TRUE_IF_VAR): Do not return true for PLACEHOLDER_EXPR.

From-SVN: r187892

gcc/ChangeLog
gcc/tree-inline.c
gcc/tree.c

index d8af885ee33673c78bea279e4916789120a310b6..136855a9959ebf04e592723487dc81ebc53955a7 100644 (file)
@@ -1,3 +1,9 @@
+2012-05-25  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR lto/52178
+       * tree-inline.c (remap_gimple_op_r): Fix handling of FIELD_DECL.
+       * tree.c (RETURN_TRUE_IF_VAR): Do not return true for PLACEHOLDER_EXPR.
+
 2012-05-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
        * config/rs6000/t-linux64: Delete the 32-bit multilib that uses
index a987ff0f8aec815c262a926c3dcd944519dbb3ad..0190aa953f51aaaa63466c17b871cdde45482bc0 100644 (file)
@@ -818,6 +818,15 @@ remap_gimple_op_r (tree *tp, int *walk_subtrees, void *data)
               || decl_function_context (*tp) == id->src_fn))
     /* These may need to be remapped for EH handling.  */
     *tp = remap_decl (*tp, id);
+  else if (TREE_CODE (*tp) == FIELD_DECL)
+    {
+      /* If the enclosing record type is variably_modified_type_p, the field
+        has already been remapped.  Otherwise, it need not be.  */
+      tree *n = (tree *) pointer_map_contains (id->decl_map, *tp);
+      if (n)
+       *tp = *n;
+      *walk_subtrees = 0;
+    }
   else if (TYPE_P (*tp))
     /* Types may need remapping as well.  */
     *tp = remap_type (*tp, id);
index 1ee3f1db51e4a7a67f60bc65b3750e3cb15486c9..de4a1c042022a2b4d5ba666defe52c1cdade9604 100644 (file)
@@ -8477,8 +8477,11 @@ variably_modified_type_p (tree type, tree fn)
    a variable in FN.  */
 #define RETURN_TRUE_IF_VAR(T)                                          \
   do { tree _t = (T);                                                  \
-    if (_t && _t != error_mark_node && TREE_CODE (_t) != INTEGER_CST   \
-        && (!fn || walk_tree (&_t, find_var_from_fn, fn, NULL)))       \
+    if (_t != NULL_TREE                                                        \
+       && _t != error_mark_node                                        \
+       && TREE_CODE (_t) != INTEGER_CST                                \
+       && TREE_CODE (_t) != PLACEHOLDER_EXPR                           \
+       && (!fn || walk_tree (&_t, find_var_from_fn, fn, NULL)))        \
       return true;  } while (0)
 
   if (type == error_mark_node)
This page took 0.08729 seconds and 5 git commands to generate.