From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23964 invoked by alias); 20 Jun 2007 17:40:08 -0000 Received: (qmail 23852 invoked by uid 48); 20 Jun 2007 17:39:59 -0000 Date: Wed, 20 Jun 2007 17:40:00 -0000 Message-ID: <20070620173959.23851.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/20520] allocatable arrays used uninitialized without a warning In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus 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-06/txt/msg01747.txt.bz2 ------- Comment #7 from burnus at gcc dot gnu dot org 2007-06-20 17:39 ------- > Even ICC 8.1 accepts the code without warnings I never found ifort (or sunf95) especially picky - contrary to NAG f95, which is often too picky. I'm in favour of giving a warning; actually I would even warn by default and not only when using -W*. There is hardly any code imaginable which makes sense and uses not allocated variables. (The only thing which comes into my mind is code where the non-allocated variables are never accessed: dead if branch, not calling the subroutine w/ that variable etc.) NAG f95: Error: x.f90, line 5: ALLOCATABLE array B used but never ALLOCATEd detected at END@ Error: x.f90, line 5: ALLOCATABLE array A used but never ALLOCATEd detected at END@ g95: Nothing by default, but with -Wall: Warning (147): Variable 'b' at (1) is used and never allocated Warning (112): Variable 'a' at (1) is set but never used -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20520