------- Comment #1 from burnus at gcc dot gnu dot org  2007-09-13 18:40 -------
Another example. With gfortran 4.3.0 it print the following, with NAG f95, g95,
ifort and gfortran 4.2.2 the expected.

b1: " AAP NOOT MIES WIM ZUS JET                   "
b2: "b(2)='SURF.PRESSURE'                         "
b3: "b(3)='APEKOOL'                               "

Expected:
b1: " AAP NOOT MIES WIM ZUS JET                   "
b2: "SURF.PRESSURE                                "
b3: "APEKOOL                                      "


program test
implicit none
character(len=45) :: b(3)
namelist /nam/ b
b = 'x'
open(99)
write(99,'(4(a,/),a)') "&NAM", &
      " b(1)=' AAP NOOT MIES WIM ZUS JET',", &
      " b(2)='SURF.PRESSURE',", &
      " b(3)='APEKOOL',", &
      " /"
rewind(99)
read(99,nml=nam)
close(99,status='delete')

print '(3a)', 'b1: "',b(1),'"'
print '(3a)', 'b2: "',b(2),'"'
print '(3a)', 'b3: "',b(3),'"'

print '(/,"Expected:")'
print '(a)', 'b1: " AAP NOOT MIES WIM ZUS JET                   "'
print '(a)', 'b2: "SURF.PRESSURE                                "'
print '(a)', 'b3: "APEKOOL                                      "'
end program test


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu dot
                   |                            |org


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

Reply via email to