From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11732 invoked by alias); 24 Feb 2010 06:46:27 -0000 Received: (qmail 11574 invoked by uid 48); 24 Feb 2010 06:46:14 -0000 Date: Wed, 24 Feb 2010 06:46:00 -0000 Message-ID: <20100224064614.11573.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/38112] unneeded temporary In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pault 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/msg02409.txt.bz2 ------- Comment #7 from pault at gcc dot gnu dot org 2010-02-24 06:46 ------- (In reply to comment #6) > Just to make sure it won't get forgotten: REOPEN. > > (In reply to comment #4) > > Paul, for the test case in comment 0 we still create a temporary: > > > > b(a)=1 > > Tobias, Not if 'a' has the right KIND. Try SUBROUTINE S(a, b) INTEGER(8), POINTER, DIMENSION(:) :: a INTEGER, DIMENSION(:) :: b b(a)=1 END SUBROUTINE S See trans-array.c:5099 - that's where the temporary is generated, when a is default kind. This could be fixed but, right now, I am not sure how :-( Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38112