From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9151 invoked by alias); 22 Mar 2007 22:20:47 -0000 Received: (qmail 9100 invoked by uid 48); 22 Mar 2007 22:20:34 -0000 Date: Thu, 22 Mar 2007 22:20:00 -0000 Message-ID: <20070322222034.9099.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/27589] Add compiler flag to check for uninitalized values at runtime 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-03/txt/msg02147.txt.bz2 ------- Comment #2 from burnus at gcc dot gnu dot org 2007-03-22 22:20 ------- There are actually two run-time tests possible: a) Check only local variables (What to do about actual arguments to intent(in) dummy arguments? In the most cases this is wrong, however foo(read_argument=.false.,arg=uninitialized) is possible. Better don't check - or only optionally.) This seems to be done by ifort's -check uninit. b) Checking all calls, i.e. by passing additional information. This is done by NAG f95's -C=undefined. This is more comprehensive, but makes procedures compiled -C=undefined incompatible to those compiled without. Ideally, gfortran should offer both options. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27589