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: [PATCH] PR fortran/23516 add IMAG support


Steve Kargl wrote:
> On Wed, Sep 21, 2005 at 02:47:30PM -0700, Steve Kargl wrote:
>>troutmask:sgk[578] more k.f.t02.original 
>>MAIN__ ()
>>{
>>  real8 y;
>>  real8 x;
>>  complex8 z;
>>
>>  z = __complex__ (1.0e+0, 2.0e+0);
>>  y = IMAGPART_EXPR <z>;
>>  y = IMAGPART_EXPR <z>;
>>  x = (real8) (real4) REALPART_EXPR <z>;
>>}
>>
>>Note, the (real4) cast is wrong.  I'll need to look at this 
>>some more.
>>
> 
> 
> Just to follow-up, if I explicitly add the gfc_resolve_real
> 
>   /* This provides compatibility with g77.  */
>   add_sym_1 ("realpart", 1, 0, BT_REAL, dr, GFC_STD_GNU,
> 	     gfc_check_fn_c, gfc_simplify_realpart, gfc_resolve_real,
> 	     a, BT_COMPLEX, dr, REQUIRED);
> 

The patch is ok with this change.

Thanks,
- Tobi


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