From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32614 invoked by alias); 1 Aug 2013 14:58:28 -0000 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 Received: (qmail 32565 invoked by uid 48); 1 Aug 2013 14:58:26 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55207] Automatic deallocation of variables declared in the main program Date: Thu, 01 Aug 2013 14:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-08/txt/msg00030.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55207 --- Comment #9 from janus at gcc dot gnu.org --- (In reply to janus from comment #8) > I think we need the patch in comment 6 after all. But how do we get rid of > the remaining regressions? Simplest solution: Move the code in these test cases from the main program into a subroutine (or similar). Then the variables will not be SAVEd and all optimizations can be applied as before. (However, it's a bit unfortunate that we lose the possibility to do these optimizations in the main program.)