diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-05-24 18:19:43 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-05-24 18:19:43 +0200 |
commit | 7adb26f20259aadcd6e2df6ece474eca615af978 (patch) | |
tree | 6b7fa6dd48f9c9d394a3bbe75f0594125c46edad /gcc/cp/semantics.c | |
parent | e90434e3aa9e51874bd5ebebf054aed123df06f2 (diff) | |
download | gcc-7adb26f20259aadcd6e2df6ece474eca615af978.zip gcc-7adb26f20259aadcd6e2df6ece474eca615af978.tar.gz gcc-7adb26f20259aadcd6e2df6ece474eca615af978.tar.bz2 |
re PR c++/71257 (OpenMP declare simd linear with ref modifier doesn't accept references to non-integer/non-pointer)
PR c++/71257
* tree-vect-stmts.c (vectorizable_simd_clone_call): Handle
SIMD_CLONE_ARG_TYPE_LINEAR_REF_CONSTANT_STEP like
SIMD_CLONE_ARG_TYPE_LINEAR_CONSTANT_STEP. Add
SIMD_CLONE_ARG_TYPE_LINEAR_VAL_CONSTANT_STEP and
SIMD_CLONE_ARG_TYPE_LINEAR_UVAL_CONSTANT_STEP cases explicitly.
* semantics.c (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>:
For OMP_CLAUSE_LINEAR_REF don't require type to be
integral or pointer.
* g++.dg/vect/simd-clone-6.cc: New test.
* g++.dg/gomp/declare-simd-6.C: New test.
From-SVN: r236648
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 06dee5a..21ef42f 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -5881,7 +5881,7 @@ finish_omp_clauses (tree clauses, enum c_omp_region_type ort) break; } } - else + else if (OMP_CLAUSE_LINEAR_KIND (c) != OMP_CLAUSE_LINEAR_REF) { if (!INTEGRAL_TYPE_P (type) && TREE_CODE (type) != POINTER_TYPE) |