diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-01-31 21:47:48 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-01-31 21:47:48 +0100 |
commit | c9243c043c06d0f8576ff4f76b92d41143d2fc2e (patch) | |
tree | 71764042a0b170dce07b1b4c90d2b1a9b9926e3b /gcc/fortran/openmp.c | |
parent | eddd715c77c55f342e41419410fc577f71905800 (diff) | |
download | gcc-c9243c043c06d0f8576ff4f76b92d41143d2fc2e.zip gcc-c9243c043c06d0f8576ff4f76b92d41143d2fc2e.tar.gz gcc-c9243c043c06d0f8576ff4f76b92d41143d2fc2e.tar.bz2 |
re PR fortran/84116 (ICE in gfc_match_omp_clauses, at fortran/openmp.c:1354)
PR fortran/84116
* openmp.c (gfc_match_omp_clauses): If all the linear
gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
nor set *head = NULL. Formatting fixes.
* gfortran.dg/gomp/pr84116.f90: New test.
From-SVN: r257266
Diffstat (limited to 'gcc/fortran/openmp.c')
-rw-r--r-- | gcc/fortran/openmp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index 2f0fef1..5a14925 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -1318,23 +1318,21 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask, else if (gfc_match_omp_variable_list (" val (", &c->lists[OMP_LIST_LINEAR], false, NULL, &head) - == MATCH_YES) + == MATCH_YES) linear_op = OMP_LINEAR_VAL; else if (gfc_match_omp_variable_list (" uval (", &c->lists[OMP_LIST_LINEAR], false, NULL, &head) - == MATCH_YES) + == MATCH_YES) linear_op = OMP_LINEAR_UVAL; else if (gfc_match_omp_variable_list ("", &c->lists[OMP_LIST_LINEAR], false, &end_colon, &head) - == MATCH_YES) + == MATCH_YES) linear_op = OMP_LINEAR_DEFAULT; else { - gfc_free_omp_namelist (*head); gfc_current_locus = old_loc; - *head = NULL; break; } if (linear_op != OMP_LINEAR_DEFAULT) |