From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14263 invoked by alias); 6 Oct 2004 22:48:53 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 14233 invoked by uid 48); 6 Oct 2004 22:48:52 -0000 Date: Wed, 06 Oct 2004 22:48:00 -0000 From: "tobi at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20041006224848.17872.tobi@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug fortran/17872] New: gfortran accepts 255_1 as integer constant X-Bugzilla-Reason: CC X-SW-Source: 2004-10/txt/msg00786.txt.bz2 List-Id: the following compiles without error: integer*1 :: i1 = 255_1 integer*2 :: i2 = 65535_2 end we're using signed integers, so this shouldn't happen. the reason is that gfc_check_integer_range compares the integer against gfc_integer_kinds[i].max_int which is 255 for kind 1, etc. not gfc_integer_kinds[i].huge, which is 127 for kind 1 etc. Changing this might break boz constants (e.g. z'ffffffff'), this has to be investigated when creating a patch. -- Summary: gfortran accepts 255_1 as integer constant Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: minor Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tobi at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17872