Commit 77524e0d by Jakub Jelinek Committed by Jakub Jelinek

re PR fortran/72716 (ICE in gfc_resolve_omp_declare_simd, at fortran/openmp.c:5156)

	PR fortran/72716
	* openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
	BLOCK DATA ns, it will be rejected later.

	* gfortran.dg/gomp/pr72716.f90: New test.

From-SVN: r239250
parent 2187f2a2
2016-08-08 Jakub Jelinek <jakub@redhat.com>
PR fortran/72716
* openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
BLOCK DATA ns, it will be rejected later.
2016-08-08 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/71936
......
......@@ -2000,6 +2000,12 @@ gfc_match_omp_declare_simd (void)
false) != MATCH_YES)
return MATCH_ERROR;
if (gfc_current_ns->is_block_data)
{
gfc_free_omp_clauses (c);
return MATCH_YES;
}
ods = gfc_get_omp_declare_simd ();
ods->where = where;
ods->proc_name = proc_name;
......
2016-08-08 Jakub Jelinek <jakub@redhat.com>
PR fortran/72716
* gfortran.dg/gomp/pr72716.f90: New test.
PR middle-end/72781
* gcc.dg/gomp/pr72781.c: New test.
......
! PR fortran/72716
! { dg-do compile }
block data
!$omp declare simd (z) ! { dg-error "statement is not allowed inside of BLOCK DATA" }
end block data
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