Commit 5954faa7 by Steven G. Kargl

re PR fortran/78571 (ICE in create_character_initializer, at fortran/data.c:191)

2018-06-08  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/78571
	* data.c (create_character_initializer): Return early if type is
	incompatible with CHARACTER.

2018-06-08  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/78571
	* gfortran.dg/pr78571.f90: New test.

From-SVN: r261343
parent f57d1446
2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78571
* data.c (create_character_initializer): Return early if type is
incompatible with CHARACTER.
2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/86045
......
......@@ -107,7 +107,10 @@ create_character_initializer (gfc_expr *init, gfc_typespec *ts,
HOST_WIDE_INT len, start, end, tlen;
gfc_char_t *dest;
bool alloced_init = false;
if (init && init->ts.type != BT_CHARACTER)
return NULL;
gfc_extract_hwi (ts->u.cl->length, &len);
if (init == NULL)
......
2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78571
* gfortran.dg/pr78571.f90: New test.
2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
PR target/85755
......
! { dg-do compile }
! PR fortran/78571
program p
type t
character :: c
end type
character :: x = t('a') ! { dg-error "convert TYPE" }
data x /'b'/
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