re PR fortran/77460 (ICE when summing an overflowing array)

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

	PR fortran/77460
	* simplify.c (simplify_transformation_to_scalar):  On error, result
	may be NULL, simply return.

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

	PR fortran/77460
	* gfortran.dg/pr77460.f90: New test.

From-SVN: r239979
This commit is contained in:
Steven G. Kargl 2016-09-04 18:43:40 +00:00
parent 5961d13d27
commit e85921ee9f
4 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77460
* simplify.c (simplify_transformation_to_scalar): On error, result
may be NULL, simply return.
2016-08-31 Jakub Jelinek <jakub@redhat.com>
PR fortran/77352

View File

@ -489,6 +489,8 @@ simplify_transformation_to_scalar (gfc_expr *result, gfc_expr *array, gfc_expr *
}
result = op (result, gfc_copy_expr (a));
if (!result)
return result;
}
return result;

View File

@ -1,3 +1,8 @@
2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77460
* gfortran.dg/pr77460.f90: New test.
2016-09-03 Jakub Jelinek <jakub@redhat.com>
PR c/65467

View File

@ -0,0 +1,7 @@
! { dg-do compile }
double precision, parameter :: x = huge(1d0)
print*, sum((/x,-x/))
print*, sum((/x,x,-x,-x/)) ! { dg-error "overflow" }
print*, sum((/x,-x,1d0/))
print*, sum((/1d0,x,-x/))
end