re PR fortran/60144 (Misleading error message when missing "then" after "if" and...
authorDominique d'Humieres <dominiq@gcc.gnu.org>
Wed, 1 May 2019 17:40:22 +0000 (19:40 +0200)
committerDominique d'Humieres <dominiq@gcc.gnu.org>
Wed, 1 May 2019 17:40:22 +0000 (19:40 +0200)
commitdb9c37294126d7c918b0cc918bd73feade0599c2
treeead616d93576d559efec6dca4437939b85eb2c28
parentd36405344205c58beb1947719345ec80fdc00a34
re PR fortran/60144 (Misleading error message when missing "then" after "if" and "else if")

2019-05-01 Dominique d'Humieres  <dominiq@gcc.gnu.org>

PR fortran/60144
* match.c (gfc_match_parens): Change the location for missing ')'.
(gfc_match_if): Detect a missing '('. Remove the spurious named
constant error. Change the wording of some errors.
(gfc_match_else): Change the wording of an error.
(gfc_match_elseif): Detect a missing '('. Improve the matching
process to get a better syntax analysis.

PR fortran/60144
* gfortran.dg/block_name_2.f90: Adjust dg-error.
* gfortran.dg/dec_type_print_3.f90.f90: Likewise
* gfortran.dg/pr60144.f90: New test.

From-SVN: r270776
gcc/fortran/ChangeLog
gcc/fortran/match.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/block_name_2.f90
gcc/testsuite/gfortran.dg/dec_type_print_3.f90
gcc/testsuite/gfortran.dg/pr60144.f90 [new file with mode: 0644]