diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-01-16 16:18:24 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-01-16 16:18:24 +0100 |
commit | 47c268c4b27782717fbccec5019e0cd97d005afb (patch) | |
tree | 5c745cb7d58bf3c4f7d5f54233cd961caf3125d2 /gcc/tree.c | |
parent | fb2f98bb6c5e016514bc3b93f8f1550e39e7d28f (diff) | |
download | gcc-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) |