Intel Fortran 8, bug with trimmed string arguments
From: Pierre Asselin (pa_at_see.signature.invalid)
Date: 03/31/04
- Next message: Tim Prince: "Re: 64bit linux and fortran 90"
- Previous message: Paul Van Delst: "Re: 64bit linux and fortran 90"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 31 Mar 2004 17:58:43 +0000 (UTC)
Found this apparent bug in the Intel Fortran compiler for Linux when
trying to pass a TRIMmed string as an actual argument. The workaround
is easy enough, just don't do that.
<rant>
I wasted a couple of hours trying to submit this bug anonymously
through the Intel web site. I do not wish to register for a
support account, nor do I want to click "accept" on legal
boilerplate that I don't understand. I'm just evaluating the
compiler, I found a probable bug, I want to let Intel know, I
don't care if they fix it or not and I don't need to hear from
them.
</rant>
I figured I wouldd just cut'n paste the typescript here. At least
Steve will see it. I just edited the binary garbage near the bottom
to \x escapes.
----------------------------------------------------------------------
Script started on Wed Mar 31 11:57:54 2004
sh-2.05$ cat /proc/version
Linux version 2.4.7-10 (bhcompile@stripples.devel.redhat.com) (gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)) #1 Thu Sep 6 16:46:36 EDT 2001
sh-2.05$ rpm -qa | grep glibc
glibc-2.2.4-13
glibc-devel-2.2.4-13
glibc-common-2.2.4-13
sh-2.05$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-108.7.2)
sh-2.05$ rpm -qf $(which ifort)
intel-ifort8-8.0-40
sh-2.05$ echo; cat badstrings.f90; echo
module trivial
contains
function my_copy(str) result(s)
implicit none
character(*), intent(in):: str
character(len(str)) s
s= str
return
end function my_copy
end module trivial
program boom
use trivial
implicit none
print "('This works: ''',a,'''')", my_copy('coucou')
print "('this fails: ''',a,'''')", my_copy(trim('coucou'))
end program boom
sh-2.05$ ifort badstrings.f90
sh-2.05$ ./a.out
This works: 'coucou'
this fails: 'd\xf9\xff\xbf^F^@'
sh-2.05$ exit
exit
Script done on Wed Mar 31 11:59:01 2004
----------------------------------------------------------------------
-- pa at panix dot com
- Next message: Tim Prince: "Re: 64bit linux and fortran 90"
- Previous message: Paul Van Delst: "Re: 64bit linux and fortran 90"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|