This is the mail archive of the 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: Updated code for array argment passing

On Tuesday 25 November 2003 1:04 am, wrote:
> Hi, paul
> I am sorry that the attach file I send last time did
> not include the modification code of trans-array.c.
> The new attach is all changes about array actual
> argument passing. would you please check them agian?
> 2003-11-24 Kejia Zhao <>
> * trans-array.c (gfc_conv_array_parameter): Simplify
> array argument passing for array name actual argument.
> * trans-expr.c (gfc_conv_function_call): Ditto
> * trans-types.c (gfc_is_nodesc_array):Ditto.

!               f = formal ? (!formal->sym->attr.pointer
!                            && formal->sym->as->type != AS_ASSUMED_SHAPE)
!                          : 0;
!               g77 = (g77 && f) || sym->attr.always_explicit;
!               gfc_conv_array_parameter (&parmse, arg->expr, argss, g77);

This is obviously wrong, and causes many testsuite failures. Please test 
your patches with at least a "make check-f95" before submitting them.

You need to go back and recheck the logic in the above code. You also change 
the value of "g77", making the calling convention dependent on the previous 
arguments. This doesn't seem right.

Please also add a comment saying which calling convention (pointer (ie g77)  
or array descriptor)  is used in which circumstances.


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