diff options
author | Tom de Vries <tom@codesourcery.com> | 2015-12-08 14:17:42 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2015-12-08 14:17:42 +0000 |
commit | 8498c16b04adcd57a409130c8c6d794708de814a (patch) | |
tree | 5d5e873c64683eb03b2bf89542e520f9abc5af4e /gcc/omp-low.c | |
parent | 9b340934694e541e99701346263cb0f6c53b4438 (diff) | |
download | gcc-8498c16b04adcd57a409130c8c6d794708de814a.zip gcc-8498c16b04adcd57a409130c8c6d794708de814a.tar.gz gcc-8498c16b04adcd57a409130c8c6d794708de814a.tar.bz2 |
Clear restrict in install_var_field
2015-12-08 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/68640
* omp-low.c (install_var_field): Clear the restrict qualifier on the var
type.
From-SVN: r231411
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index d1d1e3c..5643480 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -1389,6 +1389,13 @@ install_var_field (tree var, bool by_ref, int mask, omp_context *ctx, || !is_gimple_omp_oacc (ctx->stmt)); type = TREE_TYPE (var); + /* Prevent redeclaring the var in the split-off function with a restrict + pointer type. Note that we only clear type itself, restrict qualifiers in + the pointed-to type will be ignored by points-to analysis. */ + if (POINTER_TYPE_P (type) + && TYPE_RESTRICT (type)) + type = build_qualified_type (type, TYPE_QUALS (type) & ~TYPE_QUAL_RESTRICT); + if (mask & 4) { gcc_assert (TREE_CODE (type) == ARRAY_TYPE); |