public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31820]  New: Warning if case label value exceeds maximum value for type
@ 2007-05-04 16:59 burnus at gcc dot gnu dot org
  2007-06-21 17:49 ` [Bug fortran/31820] " dfranke at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-05-04 16:59 UTC (permalink / raw)
  To: gcc-bugs

integer(kind=1) i          ! kind = 1, -128 <= i < 127
    select case (i)
    case (200)         ! kind = 4, unreachable because of range of i

Taken from gfortran.dg/select_5.f90.

This is valid, but one should print a warning. One may also print an error
since having such a case label does not make sense.

NAG f95:  warning: case label value exceeds maximum value for type

g95: Error: Integer overflow in CASE statement at (1)

ifort:  Error: select_5.f90, line 11: The case-value is out-of-range.


-- 
           Summary: Warning if case label value exceeds maximum value for
                    type
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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

end of thread, other threads:[~2010-05-11 15:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-04 16:59 [Bug fortran/31820] New: Warning if case label value exceeds maximum value for type burnus at gcc dot gnu dot org
2007-06-21 17:49 ` [Bug fortran/31820] " dfranke at gcc dot gnu dot org
2007-06-21 19:05 ` dfranke at gcc dot gnu dot org
2007-08-08 17:10 ` fxcoudert at gcc dot gnu dot org
2007-08-15 14:39 ` fxcoudert at gcc dot gnu dot org
2007-10-04 21:59 ` tobi at gcc dot gnu dot org
2007-12-08 18:08 ` fxcoudert at gcc dot gnu dot org
2010-05-09  9:12 ` dfranke at gcc dot gnu dot org
2010-05-09 12:59 ` dfranke at gcc dot gnu dot org
2010-05-11 15:43 ` dfranke at gcc dot gnu dot org
2010-05-11 15:46 ` dfranke 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).