This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31197] [4.3/4.2 regression^2] TRANSPOSE/RESHAPE and strings
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2007 16:29:35 -0000
- Subject: [Bug fortran/31197] [4.3/4.2 regression^2] TRANSPOSE/RESHAPE and strings
- References: <bug-31197-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from fxcoudert at gcc dot gnu dot org 2007-05-04 17:29 -------
(In reply to comment #5)
> Segafult is because sym->ts.cl is NULL coming into gfc_conv_function_call. I
> suspect reshape is not getting resolved correctly.
I've given this one a look this afternoon, and I couldn't see where the problem
is when resolving reshape. It is in fact more general, since TRANSPOSE also has
this issue, and I think other transformational intrinsics would behave the
same:
type data
character(len=1) :: a
end type
type(data), target :: z(1,1)
z(:,:)%a = "1"
write(*,*) transpose(z(:,:)%a(:))
write(*,*) transpose(z(:,:)%a(1:1))
end
That being said, I don't have the slightest idea where the charlen should be
set. (In the above code, the first TRANSPOSE line works fine: where is that
charlen set?)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31197