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/22607] New: Elemental character functions don't work


$ cat clen.f90
program main
  implicit none
  character(len=2) :: a(2),b(2)
  a = 'xy'
  b = fun(a)
  print '(2(A2,1X))',b
  print '(2(A2,1X))',fun(a)
contains
  elemental function fun(arg)
    character(len=*), intent(in) :: arg
    character(len=2) :: fun
    fun = arg(2:2) // arg(1:1)
  end function fun
end program main
$ gfortran clen.f90
$ ./a.out


$ ./a.out | wc -c
     12
$ ifort clen.f90
$ ./a.out
yx yx
yx yx
$ gfortran -v
Using built-in specs.
Target: ia64-unknown-linux-gnu
Configured with: ../gcc-4.1-20050716/configure --prefix=/home/zfkts --enable-
languages=c,f95
Thread model: posix
gcc version 4.1.0 20050716 (experimental)

-- 
           Summary: Elemental character functions don't work
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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