public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/17912] New: gfortran: Bogus "Arithmetic overflow" error, regression w.r.t. g77
@ 2004-10-09 16:19 anlauf at hep dot tu-darmstadt dot de
  2004-10-09 18:37 ` [Bug fortran/17912] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: anlauf at hep dot tu-darmstadt dot de @ 2004-10-09 16:19 UTC (permalink / raw)
  To: gcc-bugs

Hi,

this code fails to compile with gfortran, but compiles with g77
(and, needless to say, other compilers ;-)

      program gfcbug16
      integer i
      i = -2147483647 - 1
      print *, i
      end

I get:

 In file gfcbug16.f:3

      i = -2147483647 - 1                                               
         1
Error: Arithmetic overflow at (1)


Note that the integer constants are perfectly legal (so this is different
from bug report #13490), but gfortran sort of "optimizes" by calculating
the difference and then complains, even if compiling with -O0 -g.

I could live with a (suppressible) warning message, but throwing an error
clearly breaks legacy code.

Cheers,
-ha

-- 
           Summary: gfortran: Bogus "Arithmetic overflow" error, regression
                    w.r.t. g77
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anlauf at hep dot tu-darmstadt dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2004-11-21 16:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-09 16:19 [Bug fortran/17912] New: gfortran: Bogus "Arithmetic overflow" error, regression w.r.t. g77 anlauf at hep dot tu-darmstadt dot de
2004-10-09 18:37 ` [Bug fortran/17912] " pinskia at gcc dot gnu dot org
2004-10-11 16:28 ` tobi at gcc dot gnu dot org
2004-10-19 18:54 ` coyote at coyotegulch dot com
2004-10-19 19:07 ` coyote at coyotegulch dot com
2004-10-22  0:07 ` coyote at coyotegulch dot com
2004-10-28 21:45 ` coyote at coyotegulch dot com
2004-10-28 21:46 ` coyote at coyotegulch dot com
2004-10-28 21:48 ` pinskia at gcc dot gnu dot org
2004-10-28 22:25 ` cvs-commit at gcc dot gnu dot org
2004-11-21 16:19 ` 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).