From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14251 invoked by alias); 20 Sep 2004 12:23: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 14093 invoked by uid 48); 20 Sep 2004 12:23:44 -0000 Date: Mon, 20 Sep 2004 12:23:00 -0000 From: "anlauf at hep dot tu-darmstadt dot de" To: gcc-bugs@gcc.gnu.org Message-ID: <20040920122341.17568.anlauf@hep.tu-darmstadt.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug fortran/17568] New: ISHFT intrinsic: bogus overflow error X-Bugzilla-Reason: CC X-SW-Source: 2004-09/txt/msg02245.txt.bz2 List-Id: Hi, the following code program gfcbug9 implicit none integer, parameter :: nbits = bit_size (1) integer :: res res = ishft (1, nbits-1) print *, res end program gfcbug9 fails to compile with the error message: In file gfcbug9.f90:5 res = ishft (1, nbits-1) 1 Error: Result of ISHFT overflows its kind at (1) This is a bug. AFAIK all bits that drop out left or right just should get lost. The only constraint (abs(shift) < bit_size) is satisfied. Cheers, -ha -- Summary: ISHFT intrinsic: bogus overflow error 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-cygwin http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17568