This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libgfortran] Change complex type letter to 'z'


Feng Wang wrote:

>  --- Steve Kargl <sgk@troutmask.apl.washington.edu> 的正文:> On Sat, Dec 27,

>>Your patch, IMHO, is perfectly backwards.  Complex is 
>>spelled with a "c" not a "z".
> 
>   gfc_type_letter() in intrinsic.c returnes 'z' to BT_COMPLEX. This is used by
> iresolve functions to form the name of functions to call the library function.
> Howerver the libgfortran use 'c' as the complex type letter. This cause to link
> error.

I tend to agree with Steve.  The Standard gives several specific
intrinsic function names for generic functions that get a complex
argument, and all of these start with a 'c', i.e.:

Generic function ABS, called with a complex argument, actually uses the
function CABS.

I think the gfortran should build on that and use 'c' as the specific
prefix for BT_COMPLEX, in accordance with the way libgfortran deals with
them.

Hope this helps,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc.gnu.org/fortran/ (under construction)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]