public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/19904] New: Division by zero leads to error
@ 2005-02-11 17:33 schnetter at aei dot mpg dot de
  2005-02-11 19:16 ` [Bug fortran/19904] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: schnetter at aei dot mpg dot de @ 2005-02-11 17:33 UTC (permalink / raw)
  To: gcc-bugs

I want to define a parameter that contains a nan.  When I use a division by 
zero in a parameter statement, gfortran aborts with an error instead of 
setting the parameter to nan.  (The Intel Fortran compiler accepts this 
parameter statement without warning.) 
 
subroutine x 
  implicit none 
  double precision, parameter :: zero=0, nan=0/zero 
end subroutine x 
 
$ ~/gcc/bin/gfortran -c zero.f90 
 In file zero.f90:3 
 
  double precision, parameter :: zero=0, nan=0/zero 
                                             1 
Error: Division by zero at (1) 
 
$ ~/gcc/bin/gfortran --version 
GNU Fortran 95 (GCC 4.0.0 20050126 (experimental))

-- 
           Summary: Division by zero leads to error
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schnetter at aei dot mpg dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2005-02-11 20:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-11 17:33 [Bug fortran/19904] New: Division by zero leads to error schnetter at aei dot mpg dot de
2005-02-11 19:16 ` [Bug fortran/19904] " pinskia at gcc dot gnu dot org
2005-02-11 21:34 ` sgk at troutmask dot apl dot washington dot edu
2005-02-11 21:50 ` schnetter at aei dot mpg dot de
2005-02-11 22:48 ` sgk at troutmask dot apl dot washington dot edu
2005-02-11 23:42 ` 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).