Commit c3fa5d78 by Steven G. Kargl

re PR fortran/68019 (ICE on rank mismatch of implied-shape array of user-defined type)

2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/68019
	* decl.c (add_init_expr_to_sym): Remove an assert() to allow an error
	message to be issued.

2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/68019
	* gfortran.dg/pr68019.f90: new test.

From-SVN: r229003
parent a2f6018f
2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68019
* decl.c (add_init_expr_to_sym): Remove an assert() to allow an error
message to be issued.
2015-10-18 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/67758
......
......@@ -1486,7 +1486,6 @@ add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus)
" with scalar", &sym->declared_at);
return false;
}
gcc_assert (sym->as->rank == init->rank);
/* Shape should be present, we get an initialization expression. */
gcc_assert (init->shape);
......
2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68019
* gfortran.dg/pr68019.f90: new test.
2015-10-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/67975
......
! { dg-do compile }
! Original code from Gerhard Steinmetz
! Gerhard dot Steinmetz for fortran at t-online dot de
! PR fortran/68019
!
program p
integer :: i
type t
integer :: n
end type
type(t), parameter :: vec(*) = [(t(i), i = 1, 4)]
type(t), parameter :: arr(*) = reshape(vec, [2, 2]) ! { dg-error "ranks 1 and 2 in assignment" }
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment