OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / tree.c
index 72a284c..155bbf2 100644 (file)
@@ -8445,14 +8445,19 @@ variably_modified_type_p (tree type, tree fn)
   tree t;
 
 /* Test if T is either variable (if FN is zero) or an expression containing
-   a variable in FN.  */
+   a variable in FN.  If TYPE isn't gimplified, return true also if
+   gimplify_one_sizepos would gimplify the expression into a local
+   variable.  */
 #define RETURN_TRUE_IF_VAR(T)                                          \
   do { tree _t = (T);                                                  \
     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)))        \
+       && (!fn                                                         \
+           || (!TYPE_SIZES_GIMPLIFIED (type)                           \
+               && !is_gimple_sizepos (_t))                             \
+           || walk_tree (&_t, find_var_from_fn, fn, NULL)))            \
       return true;  } while (0)
 
   if (type == error_mark_node)