Commit 719f5a10 by Steven G. Kargl

re PR fortran/91372 (Error: Unclassifiable statement)

2019-08-05  Steven g. Kargl  <kargl@gcc.gnu.org>

	PR fortran/91372
	* decl.c (gfc_match_data): Allow an implied do-loop to nestle against
	DATA.

2019-08-05  Steven g. Kargl  <kargl@gcc.gnu.org>

	PR fortran/91372
	* gfortran.dg/pr91372.f90: New test.

From-SVN: r274122
parent ab574db6
2019-08-05 Steven g. Kargl <kargl@gcc.gnu.org>
PR fortran/91372
* decl.c (gfc_match_data): Allow an implied do-loop to nestle against
DATA.
2019-08-04 Steven G. Kargl <kargl@gcc.gnu.org> 2019-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88227 PR fortran/88227
......
...@@ -624,9 +624,10 @@ gfc_match_data (void) ...@@ -624,9 +624,10 @@ gfc_match_data (void)
char c; char c;
/* DATA has been matched. In free form source code, the next character /* DATA has been matched. In free form source code, the next character
needs to be whitespace. Check that here. */ needs to be whitespace or '(' from an implied do-loop. Check that
here. */
c = gfc_peek_ascii_char (); c = gfc_peek_ascii_char ();
if (gfc_current_form == FORM_FREE && !gfc_is_whitespace (c)) if (gfc_current_form == FORM_FREE && !gfc_is_whitespace (c) && c != '(')
return MATCH_NO; return MATCH_NO;
/* Before parsing the rest of a DATA statement, check F2008:c1206. */ /* Before parsing the rest of a DATA statement, check F2008:c1206. */
......
2019-08-05 Steven g. Kargl <kargl@gcc.gnu.org>
PR fortran/91372
* gfortran.dg/pr91372.f90: New test.
2019-08-05 Marek Polacek <polacek@redhat.com> 2019-08-05 Marek Polacek <polacek@redhat.com>
PR c++/91338 - Implement P1161R3: Deprecate a[b,c]. PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
......
! { dg-do compile }
! PR fortran/91372
module module_sf_lake
implicit none
integer, parameter :: r8 = selected_real_kind(12)
integer, private :: i
real(r8) :: sand(2) ! percent sand
data(sand(i), i=1,2)/92.,80./
end module module_sf_lake
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