diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-09-08 14:18:16 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-09-08 14:18:16 +0200 |
commit | 8ebc1e0f8ee2e46d3dfc27a4b9a339074378d883 (patch) | |
tree | 43d06dd41e028e3cb91124c879236f80d2300e34 /gcc/omp-low.c | |
parent | e124cd64aef5883f19f28b2a221823dec27b9f6f (diff) | |
download | gcc-8ebc1e0f8ee2e46d3dfc27a4b9a339074378d883.tar.gz |
re PR fortran/77516 (ICE in is_gimple_min_invariant, at gimple-expr.c:706)
PR fortran/77516
* omp-low.c (lower_rec_simd_input_clauses): Use max_vf for non-positive
OMP_CLAUSE_SAFELEN_EXPR.
* gfortran.dg/gomp/pr77516.f90: New test.
From-SVN: r240037
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 7c11b504351..c890e83a401 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -4302,7 +4302,9 @@ lower_rec_simd_input_clauses (tree new_var, omp_context *ctx, int &max_vf, { tree c = find_omp_clause (gimple_omp_for_clauses (ctx->stmt), OMP_CLAUSE_SAFELEN); - if (c && TREE_CODE (OMP_CLAUSE_SAFELEN_EXPR (c)) != INTEGER_CST) + if (c + && (TREE_CODE (OMP_CLAUSE_SAFELEN_EXPR (c)) != INTEGER_CST + || tree_int_cst_sgn (OMP_CLAUSE_SAFELEN_EXPR (c)) != 1)) max_vf = 1; else if (c && compare_tree_int (OMP_CLAUSE_SAFELEN_EXPR (c), max_vf) == -1) |