OSDN Git Service

Backport from 2012-06-04 mainline r188172
[pf3gnuchains/gcc-fork.git] / gcc / tree.c
index fa01583..9278d1b 100644 (file)
@@ -4598,7 +4598,8 @@ free_lang_data_in_decl (tree decl)
   if (TREE_CODE (decl) == FIELD_DECL)
     {
       free_lang_data_in_one_sizepos (&DECL_FIELD_OFFSET (decl));
-      DECL_QUALIFIER (decl) = NULL_TREE;
+      if (TREE_CODE (DECL_CONTEXT (decl)) == QUAL_UNION_TYPE)
+       DECL_QUALIFIER (decl) = NULL_TREE;
     }
 
  if (TREE_CODE (decl) == FUNCTION_DECL)
@@ -8431,8 +8432,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)