Commit 36b54ce0 by Thomas Koenig

re PR fortran/71783 (ICE on valid code in gimplify_var_or_parm_decl at gimplify.c:1801)

2016-07-09  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/71783
	* frontend-passes.c (create_var):  Always allocate a charlen
	for character variables.

2016-07-09  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/71783
	* gfortran.dg/dependency_46.f90:  New test.

From-SVN: r238192
parent 08a357ce
2016-07-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71783
* frontend-passes.c (create_var): Always allocate a charlen
for character variables.
2016-07-08 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68426
......
......@@ -665,12 +665,10 @@ create_var (gfc_expr * e, const char *vname)
{
gfc_expr *length;
symbol->ts.u.cl = gfc_new_charlen (ns, NULL);
length = constant_string_length (e);
if (length)
{
symbol->ts.u.cl = gfc_new_charlen (ns, NULL);
symbol->ts.u.cl->length = length;
}
symbol->ts.u.cl->length = length;
else
symbol->attr.allocatable = 1;
}
......
2016-07-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71783
* gfortran.dg/dependency_46.f90: New test.
2016-07-08 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/71621
......
! { dg-do compile }
! PR 71783 - this used to ICE due to a missing charlen for the temporary.
! Test case by Toon Moene.
SUBROUTINE prtdata(ilen)
INTEGER :: ilen
character(len=ilen), allocatable :: cline(:)
allocate(cline(2))
cline(1) = 'a'
cline(2) = cline(1)
END SUBROUTINE prtdata
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