public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30694]  New: minval/maxval with +/-Inf
@ 2007-02-03 16:17 tkoenig at gcc dot gnu dot org
  2007-02-03 16:41 ` [Bug fortran/30694] " burnus at gcc dot gnu dot org
                   ` (34 more replies)
  0 siblings, 35 replies; 36+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-02-03 16:17 UTC (permalink / raw)
  To: gcc-bugs

This is strange:

$ cat minval.f90
program main
  integer :: i
  data i /z'7f800000'/
  real :: a(1)
  a(1) = transfer(i,a(1))  ! a(1) contains +Inf
  print *,a(1), minval(a)
  if (a(1) > minval(a)) print *,"Strange..."
end program main
$ gfortran minval.f90
$ ./a.out
      +Infinity  3.4028235E+38
 Strange...

Ifort gets this right:

$ ifort minval.f90
$ ./a.out
 Infinity       Infinity

We should really be initializing our starting values to +/-Inf, both
in the library and the front end.

Related, of course, to PR 30512.


-- 
           Summary: minval/maxval with +/-Inf
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org
 BugsThisDependsOn: 30512


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


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

end of thread, other threads:[~2009-12-05 21:53 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-03 16:17 [Bug fortran/30694] New: minval/maxval with +/-Inf tkoenig at gcc dot gnu dot org
2007-02-03 16:41 ` [Bug fortran/30694] " burnus at gcc dot gnu dot org
2007-02-03 19:28 ` tkoenig at gcc dot gnu dot org
2007-02-03 20:28 ` pinskia at gcc dot gnu dot org
2007-02-04  0:19 ` burnus at gcc dot gnu dot org
2007-02-05 19:41 ` burnus at gcc dot gnu dot org
2007-02-06 12:12 ` [Bug libfortran/30694] " fxcoudert at gcc dot gnu dot org
2007-02-06 12:30 ` burnus at gcc dot gnu dot org
2007-02-07 17:55 ` tkoenig at gcc dot gnu dot org
2007-02-14 20:21 ` fxcoudert at gcc dot gnu dot org
2007-03-25  9:49 ` fxcoudert at gcc dot gnu dot org
2007-03-25 20:05 ` tkoenig at gcc dot gnu dot org
2007-04-10 19:58 ` tkoenig at gcc dot gnu dot org
2007-04-15 21:12 ` tkoenig at gcc dot gnu dot org
2007-04-18 21:59 ` fxcoudert at gcc dot gnu dot org
2007-04-19 20:03 ` tkoenig at gcc dot gnu dot org
2007-05-14 21:37 ` mmitchel at gcc dot gnu dot org
2007-05-17 13:40 ` tkoenig at gcc dot gnu dot org
2007-06-15 18:56 ` tkoenig at gcc dot gnu dot org
2007-06-15 18:56 ` tkoenig at gcc dot gnu dot org
2007-06-21 18:12 ` pault at gcc dot gnu dot org
2007-07-20  3:49 ` mmitchel at gcc dot gnu dot org
2007-08-08 15:08 ` fxcoudert at gcc dot gnu dot org
2007-10-09 19:28 ` mmitchel at gcc dot gnu dot org
2007-10-17 22:32 ` fxcoudert at gcc dot gnu dot org
2007-10-17 23:49 ` jvdelisle at gcc dot gnu dot org
2007-10-17 23:58 ` kargl at gcc dot gnu dot org
2007-10-18  0:18 ` jvdelisle at gcc dot gnu dot org
2007-10-18  7:38 ` fxcoudert at gcc dot gnu dot org
2007-10-18 18:23 ` burnus at gcc dot gnu dot org
2007-12-08 18:07 ` fxcoudert at gcc dot gnu dot org
2008-02-01 16:59 ` jsm28 at gcc dot gnu dot org
2008-02-01 17:23 ` fxcoudert at gcc dot gnu dot org
2009-07-15  9:41 ` burnus at gcc dot gnu dot org
2009-07-24  8:21 ` burnus at gcc dot gnu dot org
2009-12-05 21:53 ` tkoenig 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).