[Bug fortran/31258] segfault with transpose(reshape(char))
fxcoudert at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Mar 21 00:01:00 GMT 2007
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2007-03-21 00:01 -------
(In reply to comment #0)
> CHARACTER(LEN=3), DIMENSION(10) :: Z
> CHARACTER(LEN=10) :: res
> Z(:)="123"
> write(*,'(10A1)') TRANSPOSE(RESHAPE(Z(:)(2:2),(/5,2/)))
> END
Same thing happens with
write(*,'(10A1)') RESHAPE(Z(:)(2:2),(/5,2/))
The segfault is due to the reshape symbol not having a charlen, and this is in
turn due to the source argument of RESHAPE (that is Z(:)(2:)) not having a
charlen itself: gfc_resolve_reshape simply copies the typespec of the source
arg into the result.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-03-21 00:01:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31258
More information about the Gcc-bugs
mailing list