mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
30364ce673
commit
58338bacdd
|
|
@ -1,3 +1,10 @@
|
||||||
|
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>
|
2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||||
|
|
||||||
PR fortran/61318
|
PR fortran/61318
|
||||||
|
|
|
||||||
|
|
@ -1071,13 +1071,8 @@ next_free (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gfc_match_eos () == MATCH_YES)
|
if (gfc_match_eos () == MATCH_YES)
|
||||||
{
|
gfc_error_now ("Statement label without statement at %L",
|
||||||
gfc_warning_now (0, "Ignoring statement label in empty statement "
|
&label_locus);
|
||||||
"at %L", &label_locus);
|
|
||||||
gfc_free_st_label (gfc_statement_label);
|
|
||||||
gfc_statement_label = NULL;
|
|
||||||
return ST_NONE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (c == '!')
|
else if (c == '!')
|
||||||
|
|
@ -1333,8 +1328,7 @@ next_fixed (void)
|
||||||
|
|
||||||
blank_line:
|
blank_line:
|
||||||
if (digit_flag)
|
if (digit_flag)
|
||||||
gfc_warning_now (0, "Ignoring statement label in empty statement at %L",
|
gfc_error_now ("Statement label without statement at %L", &label_locus);
|
||||||
&label_locus);
|
|
||||||
|
|
||||||
gfc_current_locus.lb->truncated = 0;
|
gfc_current_locus.lb->truncated = 0;
|
||||||
gfc_advance_line ();
|
gfc_advance_line ();
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,12 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
|
2016-08-22 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||||
|
|
||||||
PR fortran/61318
|
PR fortran/61318
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,4 @@
|
||||||
C { dg-do compile }
|
C { dg-do compile }
|
||||||
C { dg-options "-Werror -fmax-errors=1" }
|
100 ! { dg-error "Statement label without statement" }
|
||||||
100 ! { dg-error "empty statement" }
|
|
||||||
end
|
end
|
||||||
subroutine foo ! Not checked ...
|
|
||||||
end function ! ... but an error
|
|
||||||
C { dg-excess-errors "warnings being treated as errors" }
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
! { dg-do compile }
|
! { dg-do compile }
|
||||||
! { dg-options "-Werror -fmax-errors=1" }
|
100 ! { dg-error "Statement label without statement" }
|
||||||
100 ! { dg-error "empty statement" }
|
|
||||||
end
|
end
|
||||||
subroutine foo ! Not checked ...
|
|
||||||
end function ! ... but an error
|
|
||||||
! { dg-excess-errors "warnings being treated as errors" }
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
! { dg-do compile }
|
! { dg-do compile }
|
||||||
! { dg-options "-Werror" }
|
|
||||||
subroutine s
|
subroutine s
|
||||||
type t
|
type t
|
||||||
1 ! { dg-error "empty statement" }
|
1 ! { dg-error "Statement label without statement" }
|
||||||
end type
|
end type
|
||||||
end subroutine
|
end subroutine
|
||||||
! { dg-excess-errors "warnings being treated as errors" }
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
! { dg-do compile }
|
|
||||||
! PR fortran/25756.
|
|
||||||
! This used to ICE due to the space after the label.
|
|
||||||
1 ! { dg-warning "Ignoring statement label in empty statement" }
|
|
||||||
end
|
|
||||||
|
|
@ -20,8 +20,6 @@
|
||||||
1234 complex :: cplx ! { dg-error "defined but cannot be used" }
|
1234 complex :: cplx ! { dg-error "defined but cannot be used" }
|
||||||
cplx = 20.
|
cplx = 20.
|
||||||
|
|
||||||
! gfc_warning_now:
|
|
||||||
1 ! { dg-error "Ignoring statement label in empty statement" }
|
|
||||||
end
|
end
|
||||||
! { dg-final { output-exists-not } }
|
! { dg-final { output-exists-not } }
|
||||||
! { dg-excess-errors "warnings being treated as errors" }
|
! { dg-excess-errors "warnings being treated as errors" }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue