Commit 834e9dbb by Steven G. Kargl

re PR fortran/51993 (Erroneous type component initialization leads to internal compiler error)

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

	PR fortran/51993
	* decl.c (gfc_set_constant_character_len): Convert gcc_assert into an
	if-statement causing an early return leads to valid error message.

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

	PR fortran/51993
	* gfortran.dg/pr51993.f90: New test.

From-SVN: r229594
parent 99a04f4f
2015-10-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/51993
* decl.c (gfc_set_constant_character_len): Convert gcc_assert into an
if-statement causing an early return leads to valid error message.
2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/36192
......
......@@ -1293,7 +1293,9 @@ gfc_set_constant_character_len (int len, gfc_expr *expr, int check_len)
int slen;
gcc_assert (expr->expr_type == EXPR_CONSTANT);
gcc_assert (expr->ts.type == BT_CHARACTER);
if (expr->ts.type != BT_CHARACTER)
return;
slen = expr->value.character.length;
if (len != slen)
......
2015-10-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/51993
* gfortran.dg/pr51993.f90: New test.
2015-10-30 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/68106
......
! { dg-do compile }
! PR fortran/51993
! Code contributed by Sebastien Bardeau <bardeau at iram dot fr>
module mymod
type :: mytyp
character(len=3) :: a = .true. ! { dg-error "convert LOGICAL" }
end type mytyp
end module mymod
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