From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5044 invoked by alias); 17 Feb 2008 18:10:21 -0000 Received: (qmail 4922 invoked by alias); 17 Feb 2008 18:09:37 -0000 Date: Sun, 17 Feb 2008 18:10:00 -0000 Message-ID: <20080217180937.4921.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/35223] IBITS gives compiler error In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "sgk at troutmask dot apl dot washington dot edu" 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: 2008-02/txt/msg01916.txt.bz2 ------- Comment #8 from sgk at troutmask dot apl dot washington dot edu 2008-02-17 18:09 ------- Subject: Re: IBITS gives compiler error On Sun, Feb 17, 2008 at 01:10:06PM -0000, dominiq at lps dot ens dot fr wrote: > > I dont want to rant again about gfortran feature, but nevertheless I'll repeat > that this error should not be the default behavior (even a warning will an > overkill that should be restricted to -std=f* -pedantic). You're more than welcomed to submit a patch. > Now I think the gfortran behavior is inconsistent with this respect. The > following code > > print *, not(0), iand(-1,-1)!, ibits (-1, 0, bit_size (0)) > print *, ibset(2147483647, bit_size(0)-1) > end > > compiles silently and the executable prints: > > -1 -1 > -1 > > Why 2**32-1 should give an error as the result of ibits(-1, 0, bit_size (0)) > and -1 as the result of ibset(2147483647, bit_size(0)-1)? I don't remember the details for NOT() other than the simplification isn't simply because of the internal representation with GMP and GMP does not have a mpz_not function. So, NOT() may accidentally get the expected answer. I'm unfamiliar with the other functions you mentioned. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35223