This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/22607] New: Elemental character functions don't work
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jul 2005 08:37:48 -0000
- Subject: [Bug fortran/22607] New: Elemental character functions don't work
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ 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