bug in g95 ?

From: Jean-Baptiste FAURE (faure_at_lyon.cemagref.fr)
Date: 11/30/04


Date: Tue, 30 Nov 2004 08:23:55 +0100
To: Fortran 90 List <COMP-FORTRAN-90@JISCMAIL.AC.UK>

Hello,

I guess there is a bug in len_trim() implementation in g95
try these program :

       program test
       implicit none
       character*35 :: client
       open(unit=1,file='test.dat',form='formatted',status='old')
       read(1,'(a)') client
       write(*,*) len_trim(client)
       client = 'a character string'
       write(*,*) len_trim(client)
       stop
       end
where test.dat contains the string :
a character string

When I compile test with g95 under w2k the results are 19 and 18.
If you add blanks at the and of the line in the file, test counts these
blank characters.
With CVF 6.1a and ftn95 I get 18 and 18.

JBF