re PR fortran/83900 (ICE in gfc_simplify_matmul, at fortran/simplify.c:4593)

2018-01-19  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/83900
	* simplify.c (gfc_simplify_matmul): Delete bogus assertion.

2018-01-19  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/83900
	* gfortran.dg/matmul_17.f90: New test.

From-SVN: r256913
This commit is contained in:
Steven G. Kargl 2018-01-20 07:00:43 +00:00
parent bd89646c80
commit 0ba299611d
4 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2018-01019 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83900
* simplify.c (gfc_simplify_matmul): Delete bogus assertion.
2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
Backport of r250734 from mainline

View File

@ -4202,7 +4202,6 @@ gfc_simplify_matmul (gfc_expr *matrix_a, gfc_expr *matrix_b)
|| !is_constant_array_expr (matrix_b))
return NULL;
gcc_assert (gfc_compare_types (&matrix_a->ts, &matrix_b->ts));
result = gfc_get_array_expr (matrix_a->ts.type,
matrix_a->ts.kind,
&matrix_a->where);

View File

@ -1,3 +1,8 @@
2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83900
* gfortran.dg/matmul_17.f90: New test.
2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/80768

View File

@ -0,0 +1,9 @@
! { dg-do run }
! PR Fortran/83900
! Contributed by Gerhard Steinmetz <gscfq t t-online dot de>
program p
integer, parameter :: a(3,2) = 1
real, parameter :: b(2,3) = 2
real, parameter :: c(3,3) = matmul(a, b)
if (any(c /= 4.)) call abort
end