aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-01-16 16:18:24 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-01-16 16:18:24 +0100
commit47c268c4b27782717fbccec5019e0cd97d005afb (patch)
tree5c745cb7d58bf3c4f7d5f54233cd961caf3125d2 /gcc/tree.c
parentfb2f98bb6c5e016514bc3b93f8f1550e39e7d28f (diff)
downloadgcc-47c268c4b27782717fbccec5019e0cd97d005afb.zip
gcc-47c268c4b27782717fbccec5019e0cd97d005afb.tar.gz
gcc-47c268c4b27782717fbccec5019e0cd97d005afb.tar.bz2
re PR libgomp/83590 ([nvptx] openacc reduction C regressions)
PR libgomp/83590 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr) return early, inline manually is_gimple_sizepos. Make sure if we call gimplify_expr we don't end up with a gimple constant. * tree.c (variably_modified_type_p): Don't return true for is_gimple_constant (_t). Inline manually is_gimple_sizepos. * gimplify.h (is_gimple_sizepos): Remove. Co-Authored-By: Richard Biener <rguenther@suse.de> From-SVN: r256748
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 3c1403b..b3e93b8 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -8825,11 +8825,12 @@ variably_modified_type_p (tree type, tree fn)
do { tree _t = (T); \
if (_t != NULL_TREE \
&& _t != error_mark_node \
- && TREE_CODE (_t) != INTEGER_CST \
+ && !CONSTANT_CLASS_P (_t) \
&& TREE_CODE (_t) != PLACEHOLDER_EXPR \
&& (!fn \
|| (!TYPE_SIZES_GIMPLIFIED (type) \
- && !is_gimple_sizepos (_t)) \
+ && (TREE_CODE (_t) != VAR_DECL \
+ && !CONTAINS_PLACEHOLDER_P (_t))) \
|| walk_tree (&_t, find_var_from_fn, fn, NULL))) \
return true; } while (0)