From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18673 invoked by alias); 6 May 2006 08:02:32 -0000 Received: (qmail 18621 invoked by alias); 6 May 2006 08:02:22 -0000 Date: Sat, 06 May 2006 08:02:00 -0000 Message-ID: <20060506080222.18620.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/17298] gfortran ICE: Not Implemented: Scalarization of non-elemental intrinsic: __transfer1 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "paulthomas2 at wanadoo dot fr" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-05/txt/msg00599.txt.bz2 List-Id: ------- Comment #24 from paulthomas2 at wanadoo dot fr 2006-05-06 08:02 ------- Subject: Re: gfortran ICE: Not Implemented: Scalarization of non-elemental intrinsic: __transfer1 >I'm unfamiliar with Bugzilla, so if I annoy anyone, apologies. > > You made a serious comment... you won't upset anyone! > This routine is a puzzle, or else I have completely misunderstood it. The >TRANSFER is obviously spurious, as it merely allows the sort of renaming that >used to be possible with the deprecated EQUIVALENCE statement, were it to be >allowed for parameters. > > This is the nub of it; like equivalence, which is still supported in gfortran, transfer effects a bitwise mapping from source to destination. > But, why not > dcabs1 = abs(real(z)) + abs(aimag(z)) > relying on proper precision selection (or, supply d prefixes). > > ... whereas real and aimag do kind conversion, if it is necessary. > Of course, in general the TRANSFER function should work. > Best wishes, RNMcLean somewhere by yahoo.com > > In my opinion, real and aimag are better because they are likely to be more efficient; transfer is looking (as I well know!) to do the general case and needs to calculate source/destination sizes, whether or not they are packed and so on. Best regards Paul Thomas -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17298