[Bug fortran/13037] regression: g77 generates incorrect code
bdavis9659 at comcast dot net
gcc-bugzilla@gcc.gnu.org
Fri Nov 14 04:41:00 GMT 2003
------- 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
More information about the Gcc-bugs
mailing list