re PR fortran/77429 (ICE in gfc_check_dependency, at fortran/dependency.c:1261)

2016-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/77429 
	* dependency.c (gfc_check_dependency):  Convert gcc_assert() to
	a conditional and possible call to  gfc_internal_error().

2016-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/77429 
	* gfortran.dg/pr77429.f90: New test.

From-SVN: r240477
This commit is contained in:
Steven G. Kargl 2016-09-25 18:46:28 +00:00
parent f1c7e7f10f
commit 9b597c1f41
4 changed files with 20 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77429
* dependency.c (gfc_check_dependency): Convert gcc_assert() to
a conditional and possible call to gfc_internal_error().
2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77694

View file

@ -1258,7 +1258,8 @@ gfc_check_dependency (gfc_expr *expr1, gfc_expr *expr2, bool identical)
&& strcmp (expr1->value.function.name, "_F.caf_get") == 0)
return 0;
gcc_assert (expr1->expr_type == EXPR_VARIABLE);
if (expr1->expr_type != EXPR_VARIABLE)
gfc_internal_error ("gfc_check_dependency: expecting an EXPR_VARIABLE");
switch (expr2->expr_type)
{

View file

@ -1,3 +1,8 @@
2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77429
* gfortran.dg/pr77429.f90: New test.
2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77694

View file

@ -0,0 +1,7 @@
! { dg-do compile }
program p
shape(1) = 0 ! { dg-error "expression in variable definition context" }
shape(1,2) = 0 ! { dg-error "expression in variable definition context" }
shape(1,2,3) = 0 ! { dg-error "Too many arguments in call" }
lbound([1]) = 0 ! { dg-error "expression in variable definition context" }
end