re PR fortran/89077 (ICE using * as len specifier for character parameter)
2019-02-04 Harald Anlauf <anlauf@gmx.de> PR fortran/89077 * gfortran.dg/pr89077.f90: New test. 2019-02-04 Harald Anlauf <anlauf@gmx.de> PR fortran/89077 * gfortran.dg/pr89077.f90: New test. From-SVN: r268525
This commit is contained in:
parent
0058a283e1
commit
bc1efcb737
|
@ -1,3 +1,9 @@
|
|||
2019-02-04 Harald Anlauf <anlauf@gmx.de>
|
||||
|
||||
PR fortran/89077
|
||||
* decl.c (add_init_expr_to_sym): Copy length of string initializer
|
||||
to declared symbol.
|
||||
|
||||
2019-02-04 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR fortran/89185
|
||||
|
|
|
@ -1921,7 +1921,7 @@ add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus)
|
|||
}
|
||||
else if (init->ts.u.cl && init->ts.u.cl->length)
|
||||
sym->ts.u.cl->length =
|
||||
gfc_copy_expr (sym->value->ts.u.cl->length);
|
||||
gfc_copy_expr (init->ts.u.cl->length);
|
||||
}
|
||||
}
|
||||
/* Update initializer character length according symbol. */
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2019-02-04 Harald Anlauf <anlauf@gmx.de>
|
||||
|
||||
PR fortran/89077
|
||||
* gfortran.dg/pr89077.f90: New test.
|
||||
|
||||
2019-02-04 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR ipa/88985
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
! { dg-do run }
|
||||
!
|
||||
! PR fortran/89077 - ICE using * as len specifier for character parameter
|
||||
|
||||
program test
|
||||
implicit none
|
||||
integer :: i
|
||||
character(*), parameter :: s = 'abcdef'
|
||||
character(*), parameter :: t = transfer ([(s(i:i), i=1,len(s))], s)
|
||||
if (len (t) /= len (s) .or. t /= s) stop 1
|
||||
end
|
Loading…
Reference in New Issue