This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs-g77 bug in list output


albatros:~/bug/bugf_1> uname -a
FreeBSD albatros.physics.utoronto.ca 3.0-971022-SNAP FreeBSD
3.0-971022-SNAP 
albatros:~/bug/bugf_1> egcs_g77 -v
g77 version egcs-2.91.43 19980628 (gcc2 ss-980502 experimental) (from
FSF-g77 version 0.5.23)
Driving: egcs_g77 -v -c -xf77-version /dev/null -xnone
...

	The following simple program is supposed to write some numbers in two
files, "file_13" and "file_14". All the output goes to "file_14" and
this is not expected. 

      program bugf_1
c     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
c     !!!!!!!!!All the output goes to file_14 !!!!!!!!!!
c     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
c     If the write on line 20 is modified as 
c     write(13,*) (b(i),i=1,N)
c     the program works correctly
      implicit none
      integer i,N
      parameter(N = 4)
      real a(N),b(N)
      open(13,file="file_13",status="unknown")
      open(14,file="file_14",status="unknown")

      do i = 1,N
         a(i) = i
         b(i) = 100 + i
      enddo

      write(13,51) (b(i),i=1,N)  !! line 20
 51   format(2x,f10.6)

      write(14,*) a(1),a(2)

      end


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]