This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32613] New: Different results depending on unnecessary variable declaration
- From: "awgreynolds at earthlink dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jul 2007 14:53:26 -0000
- Subject: [Bug fortran/32613] New: Different results depending on unnecessary variable declaration
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
program main
call something
end
subroutine something
! integer i !correct results from gfortran depend on this statement
character lit*1,line*100
lit(i)=line(i:i)
i=1; n=5; line='PZ0R1'
if (internal(4)) stop
write(*,*) i
contains
logical function internal(j)
intent(in) j
do i=j,n
k=index('RE',lit(i)); if (k==0) cycle
if (i+1==n) exit
enddo
internal=k==0
end function
end
--
Summary: Different results depending on unnecessary variable
declaration
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: awgreynolds at earthlink dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32613