From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10677 invoked by alias); 27 Feb 2010 12:25:01 -0000 Received: (qmail 10492 invoked by uid 48); 27 Feb 2010 12:24:40 -0000 Date: Sat, 27 Feb 2010 12:25:00 -0000 Message-ID: <20100227122440.10491.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/43178] Pointless resetting to NULL for local ALLOCATABLEs 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: 2010-02/txt/msg02749.txt.bz2 ------- Comment #12 from burnus at gcc dot gnu dot org 2010-02-27 12:24 ------- (In reply to comment #11) > With the patch in comment #10, the tests in pr40440 (the original one and the > one in comment #2 give an ICE: Thanks for testing! In trans-array.c's gfc_trans_deferred_array, my current version has - if (sym->value) + if (sym->value == NULL || !has_default_initializer (sym->ts.u.derived)) ^^^^^^^^^^^^^^^^^^^^^^ This part is new Hopefully, that is all what is needed. Still, the patch needs to be audited - I wouldn't be surprised if some "free" were missing, leading to memory leakage in the generated code. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43178