Commit 84ee745e by Paul Thomas

re PR fortran/83898 (ICE in gfc_conv_expr_descriptor, at fortran/trans-array.c:7181)

2018-23-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/83898
	* trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
	for characters.

2018-23-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/83898
	* gfortran.dg/associate_33.f03 : New test.

From-SVN: r256994
parent 5955438a
2018-23-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83898
* trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
for characters.
2018-01-22 Janne Blomqvist <jb@gcc.gnu.org> 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
PR 78534 PR 78534
......
...@@ -1579,7 +1579,8 @@ trans_associate_var (gfc_symbol *sym, gfc_wrapped_block *block) ...@@ -1579,7 +1579,8 @@ trans_associate_var (gfc_symbol *sym, gfc_wrapped_block *block)
desc = sym->backend_decl; desc = sym->backend_decl;
cst_array_ctor = e->expr_type == EXPR_ARRAY cst_array_ctor = e->expr_type == EXPR_ARRAY
&& gfc_constant_array_constructor_p (e->value.constructor); && gfc_constant_array_constructor_p (e->value.constructor)
&& e->ts.type != BT_CHARACTER;
/* If association is to an expression, evaluate it and create temporary. /* If association is to an expression, evaluate it and create temporary.
Otherwise, get descriptor of target for pointer assignment. */ Otherwise, get descriptor of target for pointer assignment. */
......
2018-23-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83898
* gfortran.dg/associate_33.f03 : New test.
2018-01-23 Martin Liska <mliska@suse.cz> 2018-01-23 Martin Liska <mliska@suse.cz>
PR lto/81440 PR lto/81440
......
! { dg-do run }
!
! Test the fix for PR83898.f90
!
! Contributed by G Steinmetz <gscfq@t-online.de>
!
program p
associate (x => ['1','2'])
if (any (x .ne. ['1','2'])) call abort
end associate
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