public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41712]  New: ETIME not useable with -fdefault-real-8
@ 2009-10-15  7:20 anlauf at gmx dot de
  2009-10-15  7:59 ` [Bug fortran/41712] " dominiq at lps dot ens dot fr
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: anlauf at gmx dot de @ 2009-10-15  7:20 UTC (permalink / raw)
  To: gcc-bugs

Hi,

all gfortran versions from 4.1.x thru 4.5 refuse to compile the
following program with -fdefault-real-8:

program gfcbug90
  real :: t(2)
  print *, etime (t)
end program gfcbug90

% gfc4x gfcbug90.f90 -fdefault-real-8
gfcbug90.f90:3.18:

  print *, etime (t)
                  1
Error: 'x' argument of 'etime' intrinsic at (1) must be of kind 4


No problem with e.g. ifort or sunf95.

Cheers,
-ha


-- 
           Summary: ETIME not useable with -fdefault-real-8
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anlauf at gmx dot de


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


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

* [Bug fortran/41712] ETIME not useable with -fdefault-real-8
  2009-10-15  7:20 [Bug fortran/41712] New: ETIME not useable with -fdefault-real-8 anlauf at gmx dot de
@ 2009-10-15  7:59 ` dominiq at lps dot ens dot fr
  2009-10-15  8:47 ` anlauf at gmx dot de
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-10-15  7:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dominiq at lps dot ens dot fr  2009-10-15 07:59 -------
The manual reads:

VALUES  The type shall be REAL, DIMENSION(2). 

where I understand REAL as REAL(4). Hence if you want to use -fdefault-real-8,
you have to avoid the "promotion" of the ETIME argument by using

  real(4) :: t(2)


-- 


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


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

* [Bug fortran/41712] ETIME not useable with -fdefault-real-8
  2009-10-15  7:20 [Bug fortran/41712] New: ETIME not useable with -fdefault-real-8 anlauf at gmx dot de
  2009-10-15  7:59 ` [Bug fortran/41712] " dominiq at lps dot ens dot fr
@ 2009-10-15  8:47 ` anlauf at gmx dot de
  2009-10-15 14:13 ` kargl at gcc dot gnu dot org
  2009-10-15 17:32 ` kargl at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: anlauf at gmx dot de @ 2009-10-15  8:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from anlauf at gmx dot de  2009-10-15 08:47 -------
(In reply to comment #1)
> The manual reads:
> 
> VALUES  The type shall be REAL, DIMENSION(2). 
> 
> where I understand REAL as REAL(4). Hence if you want to use -fdefault-real-8,
> you have to avoid the "promotion" of the ETIME argument by using
> 
>   real(4) :: t(2)

Actually, the current manual does explicitly state REAL(4)
e.g. for the extension SECNDS(), but not (yet) for ETIME().

So either the gfortran documentation needs to be fixed
or my legacy code using ETIME()...


-- 


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


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

* [Bug fortran/41712] ETIME not useable with -fdefault-real-8
  2009-10-15  7:20 [Bug fortran/41712] New: ETIME not useable with -fdefault-real-8 anlauf at gmx dot de
  2009-10-15  7:59 ` [Bug fortran/41712] " dominiq at lps dot ens dot fr
  2009-10-15  8:47 ` anlauf at gmx dot de
@ 2009-10-15 14:13 ` kargl at gcc dot gnu dot org
  2009-10-15 17:32 ` kargl at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-10-15 14:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from kargl at gcc dot gnu dot org  2009-10-15 14:13 -------
(In reply to comment #2)
> (In reply to comment #1)
> > The manual reads:
> > 
> > VALUES  The type shall be REAL, DIMENSION(2). 
> > 
> > where I understand REAL as REAL(4). Hence if you want to use -fdefault-real-8,
> > you have to avoid the "promotion" of the ETIME argument by using
> > 
> >   real(4) :: t(2)
> 
> Actually, the current manual does explicitly state REAL(4)
> e.g. for the extension SECNDS(), but not (yet) for ETIME().
> 
> So either the gfortran documentation needs to be fixed
> or my legacy code using ETIME()...

The manual is fine the way it is currently written, but I'll
update it to be more specific that REAL means REAL(4).  OTOH,
I would suggest that you update all your codes to use the 
standard conforming CPU_TIME function.


-- 


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


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

* [Bug fortran/41712] ETIME not useable with -fdefault-real-8
  2009-10-15  7:20 [Bug fortran/41712] New: ETIME not useable with -fdefault-real-8 anlauf at gmx dot de
                   ` (2 preceding siblings ...)
  2009-10-15 14:13 ` kargl at gcc dot gnu dot org
@ 2009-10-15 17:32 ` kargl at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-10-15 17:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from kargl at gcc dot gnu dot org  2009-10-15 17:32 -------
See http://gcc.gnu.org/ml/gcc-patches/2009-10/msg00993.html


-- 

kargl at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2009-10-15 17:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-15  7:20 [Bug fortran/41712] New: ETIME not useable with -fdefault-real-8 anlauf at gmx dot de
2009-10-15  7:59 ` [Bug fortran/41712] " dominiq at lps dot ens dot fr
2009-10-15  8:47 ` anlauf at gmx dot de
2009-10-15 14:13 ` kargl at gcc dot gnu dot org
2009-10-15 17:32 ` kargl 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).