From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30641 invoked by alias); 9 Mar 2010 19:41:18 -0000 Received: (qmail 30551 invoked by uid 48); 9 Mar 2010 19:40:56 -0000 Date: Tue, 09 Mar 2010 19:41:00 -0000 Message-ID: <20100309194056.30550.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/43310] -pedantic errors on valid code involving PARAMETERs initialized to intrinsic function result In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "kargl 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: 2010-03/txt/msg00851.txt.bz2 ------- Comment #1 from kargl at gcc dot gnu dot org 2010-03-09 19:40 ------- Don't use -pedantic. It forces a symmetric range on the integer type, [-huge():huge]. This can be checked during constant folding, and NOT(A) is detected as an error. gfortran does not instrument the runtime code for NOT(B), so it cannot detect that you are violating the range of the pedantic integer type. The GCC middle end and back end do not enforce the symmetry of the range. There was a long, long, long debate about this years ago in the fortran@gcc.gnu.org mailing list. See the archives for details. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43310