aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorSteven G. Kargl <kargls@comcast.net>2006-06-23 21:05:04 +0000
committerSteven G. Kargl <kargl@gcc.gnu.org>2006-06-23 21:05:04 +0000
commit17bbca74807b33cbebdea7761536468e147cf197 (patch)
treeff382f1d911d2f4a9541a3a889b00b89584d69e3 /gcc/fortran
parentad0178f8cc0868fbc8c05f3be1f8fa4b3760cec0 (diff)
downloadgcc-17bbca74807b33cbebdea7761536468e147cf197.zip
gcc-17bbca74807b33cbebdea7761536468e147cf197.tar.gz
gcc-17bbca74807b33cbebdea7761536468e147cf197.tar.bz2
re PR fortran/27981 (Strange error message for illegal integer constant)
2006-06-23 Steven G. Kargl <kargls@comcast.net> PR fortran/27981 * match.c (gfc_match_if): Handle errors in assignment in simple if. 2006-06-23 Steven G. Kargl <kargls@comcast.net> PR fortran/27981 * gfortran.dg/simpleif_2.f90: New test. From-SVN: r114950
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/match.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index a02bebd..3b3584c 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-23 Steven G. Kargl <kargls@comcast.net>
+
+ PR fortran/27981
+ * match.c (gfc_match_if): Handle errors in assignment in simple if.
+
2006-06-22 Asher Langton <langton2@llnl.gov>
PR fortran/24748
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 448d927..0ad5e13 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -1061,6 +1061,12 @@ gfc_match_if (gfc_statement * if_type)
gfc_undo_symbols ();
gfc_current_locus = old_loc;
+ /* m can be MATCH_NO or MATCH_ERROR, here. For MATCH_NO, continue to
+ call the various matchers. For MATCH_ERROR, a mangled assignment
+ was found. */
+ if (m == MATCH_ERROR)
+ return MATCH_ERROR;
+
gfc_match (" if ( %e ) ", &expr); /* Guaranteed to match */
m = gfc_match_pointer_assignment ();