I don't have a short example for this bug, but maybe someone can see what is
going on from the error message that I get. I am running large molecular
dynamics program  
named CHARMM (Chemistry at HARvard Macromolecular Mechanics) and it runs fine
when compiled with gfortran (gcc-4.0.0-beta20050402.ebuild). Except a few
quirks. This one is very strange:

In the CHARMM we have a subroutine PSFSUM which basically prints out some info
about the molecular structure to be simulated. This is the message I get when
running CHARMM:
charmm < 100x > 100x-scalar
At line 442 of file psfsum.f
Fortran runtime error: Expected INTEGER for item 1 in formatted transfer, got
CHARACTER
(A)
^

If I make a separate program out of this line, which looks like this everything
is OK!!!

      integer unit
      unit=6
      WRITE (UNIT, '(A)')              ! this is line 441 in psfsum.f
     &   ' PSFSUM> PSF modified: NONBOND lists and IMAGE atoms cleared.'
      end

Then I go back into original psfsum.f and modify the above line to:

         WRITE (UNIT, 8888)
 8888    FORMAT(' ',
     $  ' PSFSUM> PSF modified: NONBOND lists and IMAGE atoms cleared.')

the big prgram is happy too. Note the single space string in the format
statement. If I don't put it there, then the program skips the whole line. If it
is there the printout is OK.

-- 
           Summary: Writing of strings sometime does not work
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: milan at cmm dot ki dot si
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to