This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31820] New: Warning if case label value exceeds maximum value for type
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2007 16:59:13 -0000
- Subject: [Bug fortran/31820] New: Warning if case label value exceeds maximum value for type
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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