public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/17893] New: etime complains when called as a subroutine
@ 2004-10-08 18:48 barrowes at alum dot mit dot edu
  2004-10-08 19:14 ` [Bug fortran/17893] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: barrowes at alum dot mit dot edu @ 2004-10-08 18:48 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug fortran/17893] etime complains when called as a subroutine
  2004-10-08 18:48 [Bug fortran/17893] New: etime complains when called as a subroutine barrowes at alum dot mit dot edu
@ 2004-10-08 19:14 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08 19:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-08 19:14 -------
I think the subroutine is to provide compatiabliy with G77 in which it takes two arguments
See <http://gcc.gnu.org/onlinedocs/gcc-3.4.1/g77/ETime-Intrinsic--subroutine-.html>
and <http://gcc.gnu.org/onlinedocs/gcc-3.4.1/g77/ETime-Intrinsic--function-
.html>.

So this is invalid.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-08 19:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-08 18:48 [Bug fortran/17893] New: etime complains when called as a subroutine barrowes at alum dot mit dot edu
2004-10-08 19:14 ` [Bug fortran/17893] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).