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/32613] New: Different results depending on unnecessary variable declaration


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


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