This may be related to PR 19017.

$ cat reshape-char.f90
program main
  character(len=1), dimension(2,2) :: a,b
  a = reshape((/'a', 'b', 'c', 'd'/), shape(a))
  b = transpose(a)           ! This works
  a = transpose(a)           ! This bombs
  print *,a
end program main
$ gfortran reshape-char.f90
reshape-char.f90: In function 'MAIN__':
reshape-char.f90:4: internal compiler error: in gfc_trans_scalar_assign, at
fortran/trans-expr.c:2006
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$ gfortran -v
Using built-in specs.
Configured with: ../gcc-4.0-20050102/configure --prefix=/home/zfkts
--enable-languages=c,c++,f95
Thread model: posix
gcc version 4.0.0 20050102 (experimental)
$ gfortran -dumpmachine
ia64-unknown-linux-gnu

-- 
           Summary: ICE on a = transpose(a) for character array
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Thomas dot Koenig at online dot de
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19271

Reply via email to