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]
Other format: [Raw text]

[Bug fortran/13037] regression: g77 generates incorrect code


------- Additional Comments From bdavis9659 at comcast dot net  2003-11-14 04:41 -------
Not too sure exactly what the problem is.  Please take your code snippet and
make it into an example that compiles and executes, then we can see exactly what
the problem is.

I took the liberty of creating one from your code snippets:

      subroutine bug1(expnt)
      implicit none
      double precision zeta
      common /bug1_area/zeta(3)
      double precision expnt(3)
      integer k, kkzc
      kkzc=0
      do k=1,3
         kkzc = kkzc + 1
         zeta(kkzc) = expnt(k)
      enddo
      print*,'kkzc = ',kkzc
      print*,'zeta =  (',(zeta(k),k=1,3),')'
      print*,'expnt = (',(expnt(k),k=1,3),')'
      return
      end
c     the following line activates the bug
      program test
      implicit none
      double precision kkzc(3)
      kkzc(1) = 1
      kkzc(2) = 2
      kkzc(3) = 3
      call bug1(kkzc)
      end

and then show a run of the program:

[bdavis@localhost ~]$ ./a.out
 kkzc =  3
 zeta =  (  1.  2.  3.)
 expnt = (  1.  2.  3.)


 

regards,
bud davis


-- 


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


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