bug report : gfortran E edit descriptor
sudo.michio
sudo.michio@jaea.go.jp
Thu Mar 10 23:32:00 GMT 2016
to:Dr.Dominique d'Humières and Dr.Tobias Burnus
from:Mr.Michio Sudo
Thankyou for your prompt responses.
My research was not enough.
I will use the p edit scriptor as it is.
Best regards.
----- Original Message -----
>> From: Dominique d'Humières <dominiq@lps.ens.fr>
>> To: sudo.michio@jaea.go.jp
>> Cc: GCC Development <gcc@gcc.gnu.org>,fortran@gcc.gnu.org
>> Date: 2016-03-10 19:09:33
>> Subject: Re: bug report : gfortran E edit descriptor
>>
>> > I have an trouble in E edit descriptor of gfortran.
>> > This is a example.
>> > (source file: test.f95)
>> > program test
>> > implicit none
>> > real a,b
>> > a=135.0
>> > b=1737.5
>> > write(*,*)a,b
>> > write(*,'(e9.3,a,f7.1)')a,' ',b
>> > write(*,'(1pe9.3,a,f7.1)')a,' ',b
>> > end
>> > (compile)
>> > gfortran test.f95
>> > (execute)
>> > a.exe
>> > (result)
>> > 135.000000 1737.50000
>> > 0.135E+03 1737.5
>> > 1.350E+02 17375.0 ( <--- wrong value )
>> >
>> > I suppose there are some bugs in the E edit descriptor.
>> IIRC
>> (1) the P âmodifierâ applies to all the subsequent numeric descriptors,
>> (2) when rP is applied to an F descriptor, the value is âmultipliedâ by 10**r.
>> write(*,'(e9.3,a,1pf7.1)')a,' â,b
>> gives
>> 0.135E+03 17375.0
>> and
>> write(*,'(1pe9.3,a,e9.3)')a,' â,b
>> gives
>> 1.350E+02 1.738E+03
>> So I think gfortran is right.
>>
>> > I like Fortran and I wish gfortran of GCC to be better compiler.
>> > best regards.
>> If you want to contribute, discussion about gfortran should go to fortran@gcc.gnu.org and bug should be filed in bugzilla.
>>
>> Cheers,
>>
>> Dominique
>>
>>
More information about the Fortran
mailing list