Commit c9243c04 by Jakub Jelinek Committed by Jakub Jelinek

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
parent eddd715c
2018-01-31 Jakub Jelinek <jakub@redhat.com>
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.
2018-01-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84088
......
......@@ -1332,9 +1332,7 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask,
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)
......
2018-01-31 Jakub Jelinek <jakub@redhat.com>
PR fortran/84116
* gfortran.dg/gomp/pr84116.f90: New test.
PR c++/83993
* g++.dg/init/pr83993-2.C: New test.
......
! PR fortran/84116
! { dg-do compile }
program pr84116
integer :: i, j
!$omp simd linear ((i)) ! { dg-error "Syntax error" }
do i = 1, 2
end do
!$omp simd linear () ! { dg-error "Syntax error" }
do j = 1, 2
end do
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment