From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31995 invoked by alias); 6 Feb 2011 14:23:05 -0000 Received: (qmail 31986 invoked by uid 22791); 6 Feb 2011 14:23:05 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 06 Feb 2011 14:23:01 +0000 From: "pault at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/47592] Multiple function invocation with ALLOCATE (SOURCE=REPEAT('x',bar())) X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pault at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pault at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 06 Feb 2011 14:25:00 -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 X-SW-Source: 2011-02/txt/msg00777.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47592 --- Comment #3 from Paul Thomas 2011-02-06 14:22:51 UTC --- Author: pault Date: Sun Feb 6 14:22:48 2011 New Revision: 169862 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169862 Log: 2011-02-06 Paul Thomas PR fortran/47592 * trans-stmt.c (gfc_trans_allocate): For deferred character length allocations with SOURCE, store to the values and string length to avoid calculating twice. Replace gfc_start_block with gfc_init_block to avoid unnecessary contexts and to keep declarations of temporaries where they should be. Tidy up the code a bit. 2011-02-06 Paul Thomas PR fortran/47592 * gfortran.dg/allocate_with_source_1 : New test. Added: trunk/gcc/testsuite/gfortran.dg/allocate_with_source_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-stmt.c trunk/gcc/testsuite/ChangeLog