diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2016-08-22 18:23:43 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2016-08-22 18:23:43 +0000 |
commit | 58338bacdd63bfa128d5884e7ceeb47a4431d1ad (patch) | |
tree | 44b65a190f59341048102a9f33002562c72f04b0 /gcc/fortran/parse.c | |
parent | 30364ce673723a466def350c7378ddd3cc0c6c87 (diff) | |
download | gcc-58338bacdd63bfa128d5884e7ceeb47a4431d1ad.zip gcc-58338bacdd63bfa128d5884e7ceeb47a4431d1ad.tar.gz gcc-58338bacdd63bfa128d5884e7ceeb47a4431d1ad.tar.bz2 |
re PR fortran/60774 (f951: internal compiler error: Segmentation fault: 11)
2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
Bud Davis <jmdavis@link.com>
PR fortran/60774
* parse.c (next_free,next_fixed): Issue error for statement label
without a statement.
2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/60774
* gfortran.dg/empty_label.f: Adjust test for new error message.
* gfortran.dg/empty_label.f90: Ditto.
* gfortran.dg/empty_label_typedecl.f90: Ditto.
* gfortran.dg/label_3.f90: Deleted (redundant with empty_label.f90).
* gfortran.dg/warnings_are_errors_1.f90: Remove invalid statement label.
Co-Authored-By: Bud Davis <jmdavis@link.com>
From-SVN: r239668
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index bd7b138..deba431 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -1071,13 +1071,8 @@ next_free (void) } if (gfc_match_eos () == MATCH_YES) - { - gfc_warning_now (0, "Ignoring statement label in empty statement " - "at %L", &label_locus); - gfc_free_st_label (gfc_statement_label); - gfc_statement_label = NULL; - return ST_NONE; - } + gfc_error_now ("Statement label without statement at %L", + &label_locus); } } else if (c == '!') @@ -1333,8 +1328,7 @@ next_fixed (void) blank_line: if (digit_flag) - gfc_warning_now (0, "Ignoring statement label in empty statement at %L", - &label_locus); + gfc_error_now ("Statement label without statement at %L", &label_locus); gfc_current_locus.lb->truncated = 0; gfc_advance_line (); |