aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/f95-lang.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-06-25 11:16:12 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2014-06-25 11:16:12 +0200
commitda6f124d8a567e410a2926f1cb4416ca620d271d (patch)
tree553a56ba818b9c31b883fbfc783c1b85ead87337 /gcc/fortran/f95-lang.c
parentd49f446ecd2dbe68081d25da06a528c7f2198efe (diff)
downloadgcc-da6f124d8a567e410a2926f1cb4416ca620d271d.zip
gcc-da6f124d8a567e410a2926f1cb4416ca620d271d.tar.gz
gcc-da6f124d8a567e410a2926f1cb4416ca620d271d.tar.bz2
langhooks-def.h (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Define.
* langhooks-def.h (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Define. (LANG_HOOKS_DECLS): Add it. * gimplify.c (gimplify_omp_for): Make sure OMP_CLAUSE_LINEAR_STEP has correct type. * tree.h (OMP_CLAUSE_LINEAR_ARRAY): Define. * langhooks.h (struct lang_hooks_for_decls): Add omp_clause_linear_ctor hook. * omp-low.c (lower_rec_input_clauses): Set max_vf even if OMP_CLAUSE_LINEAR_ARRAY is set. Don't fold_convert OMP_CLAUSE_LINEAR_STEP. For OMP_CLAUSE_LINEAR_ARRAY in combined simd loop use omp_clause_linear_ctor hook. gcc/c/ * c-typeck.c (c_finish_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has correct type. gcc/cp/ * semantics.c (finish_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has correct type. gcc/fortran/ * trans.h (gfc_omp_clause_linear_ctor): New prototype. * trans-openmp.c (gfc_omp_linear_clause_add_loop, gfc_omp_clause_linear_ctor): New functions. (gfc_trans_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has correct type. Set OMP_CLAUSE_LINEAR_ARRAY flag if needed. * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Redefine. libgomp/ * testsuite/libgomp.fortran/simd5.f90: New test. * testsuite/libgomp.fortran/simd6.f90: New test. * testsuite/libgomp.fortran/simd7.f90: New test. From-SVN: r211971
Diffstat (limited to 'gcc/fortran/f95-lang.c')
-rw-r--r--gcc/fortran/f95-lang.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index 40f7f18..83f7eb2 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -126,6 +126,7 @@ static const struct attribute_spec gfc_attribute_table[] =
#undef LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR
#undef LANG_HOOKS_OMP_CLAUSE_COPY_CTOR
#undef LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP
+#undef LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR
#undef LANG_HOOKS_OMP_CLAUSE_DTOR
#undef LANG_HOOKS_OMP_FINISH_CLAUSE
#undef LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR
@@ -158,6 +159,7 @@ static const struct attribute_spec gfc_attribute_table[] =
#define LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR gfc_omp_clause_default_ctor
#define LANG_HOOKS_OMP_CLAUSE_COPY_CTOR gfc_omp_clause_copy_ctor
#define LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP gfc_omp_clause_assign_op
+#define LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR gfc_omp_clause_linear_ctor
#define LANG_HOOKS_OMP_CLAUSE_DTOR gfc_omp_clause_dtor
#define LANG_HOOKS_OMP_FINISH_CLAUSE gfc_omp_finish_clause
#define LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR gfc_omp_disregard_value_expr