This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/31197] [4.3/4.2 regression^2] TRANSPOSE/RESHAPE and strings



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]