This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/13037] regression: g77 generates incorrect code
- From: "bdavis9659 at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Nov 2003 04:41:18 -0000
- Subject: [Bug fortran/13037] regression: g77 generates incorrect code
- References: <20031113124715.13037.smelkov@mph1.phys.spbu.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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