re PR fortran/52564 (Accepts invalid: Missing I/O list after comma)
2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/52564 * io.c (match_io): Add check for comma after '*' without subsequent IO list. * gfortran.dg/print_2.f90: New test. From-SVN: r268412
This commit is contained in:
parent
f7478e4e33
commit
474175e925
4 changed files with 35 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/52564
|
||||
* io.c (match_io): Add check for comma after '*' without subsequent
|
||||
IO list.
|
||||
|
||||
2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
|
||||
|
||||
PR fortran/52884
|
||||
|
|
|
@ -4172,6 +4172,23 @@ match_io (io_kind k)
|
|||
else
|
||||
gfc_current_locus = where;
|
||||
}
|
||||
|
||||
if (gfc_match_char ('*') == MATCH_YES
|
||||
&& gfc_match_char(',') == MATCH_YES)
|
||||
{
|
||||
locus where2 = gfc_current_locus;
|
||||
if (gfc_match_eos () == MATCH_YES)
|
||||
{
|
||||
gfc_current_locus = where2;
|
||||
gfc_error ("Comma after * at %C not allowed without I/O list");
|
||||
m = MATCH_ERROR;
|
||||
goto cleanup;
|
||||
}
|
||||
else
|
||||
gfc_current_locus = where;
|
||||
}
|
||||
else
|
||||
gfc_current_locus = where;
|
||||
}
|
||||
|
||||
if (gfc_current_form == FORM_FREE)
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/52564
|
||||
* gfortran.dg/print_2.f90: New test.
|
||||
|
||||
2019-01-30 Vladimir Makarov <vmakarov@redhat.com>
|
||||
|
||||
PR rtl-optimization/87246
|
||||
|
|
7
gcc/testsuite/gfortran.dg/print_2.f90
Normal file
7
gcc/testsuite/gfortran.dg/print_2.f90
Normal file
|
@ -0,0 +1,7 @@
|
|||
! { dg-do compile }
|
||||
! PR52564 Accepts invalid: Missing I/O list after comma
|
||||
program printbug
|
||||
print *, 'hello world'
|
||||
! the following line should not compile:
|
||||
print *, ! { dg-error "not allowed" }
|
||||
end program
|
Loading…
Add table
Reference in a new issue