From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3264 invoked by alias); 15 Aug 2007 14:39:09 -0000 Received: (qmail 1084 invoked by uid 48); 15 Aug 2007 14:38:58 -0000 Date: Wed, 15 Aug 2007 14:39:00 -0000 Message-ID: <20070815143858.1083.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/31820] Warning if case label value exceeds maximum value for type In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fxcoudert at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg01015.txt.bz2 ------- Comment #3 from fxcoudert at gcc dot gnu dot org 2007-08-15 14:38 ------- (In reply to comment #1) > * An INTEGER SELECT construct has a CASE that can never be matched as its > lower value is greater than its upper value. It is also implemented: $ cat u1.f90 integer :: i, j select case (i) case (251:250) end select end $ gfortran u1.f90 -Wsurprising u1.f90:3.10: case (251:250) 1 Warning: Range specification at (1) can never be matched When an error occurs, though, we will not display the warning, which is fine IMHO. We still need to add a check for the initial testcase. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31820