------- 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