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/17893] New: etime complains when called as a subroutine


Calls to etime fail when etime is called as a subroutine, but succeeds when
called as a function:

program zztest
 real x
 real times(2)
 call etime(times)
 x=100
 do i=1,1000000
  x=x-1.0/x
 end do
 print *,'x=',x
 call etime(times)
 x=times(1)
 print *,'x=',x
 print *,'times=',times
end program zztest

> gfortran -o zztest zztest.f90
 In file zztest.f90:6

 call etime(times)
                 1
Error: Missing actual argument 'time' in call to 'etime' at (1)
 In file zztest.f90:16

 call etime(times)
                 1
Error: Missing actual argument 'time' in call to 'etime' at (1)
>

Intel and g95 have no problem and return reasonable results.

Ben

-- 
           Summary: etime complains when called as a subroutine
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: barrowes at alum dot mit dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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


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