[Dwarf-discuss] F9x elemental procedures

Chris Quenelle Chris.Quenelle
Tue Jun 7 14:33:19 GMT 2005


 >   (i.e. it is a function with scalar
 >   formals which can be applied to array actuals, with the effect of
 >   applying the procedure to every element of the array)


Can you tell me what "can be applied" means in this context?

Is this describing a function body (code) that that has a special kind of
function call interface?

Is this describing a function declaration that describes a compiler-builtin?

Will a debugger be expected to call these functions in a special way
if it has support for such "elemental" functions?



--chris




James Cownie wrote:
> Folks,
> 
> Fortran 90 and later have the concept of an elemental
> subroutine/function, which is a function with scalar arguments which can
> be called with conformable array arguments. The procedure being applied
> to each element of the array arguments.
> 
> Unless I'm missing it I don't see anywhere in DWARF where a compiler can
> express this property of a procedure to the debugger.
> 
> Assuming that I'm not missing it, can I propose that we add a new
> attribute which can be used with procedures, something like this...
> 
> In section 3.3.1 (page 39 of draft 9.1) after the italic section and
> immediately before 3.3.3 add
> 
>   If a function may be applied elementally (i.e. it is a function with scalar
>   formals which can be applied to array actuals, with the effect of
>   applying the procedure to every element of the array) then the
>   subroutine entry should have a DW_AT_elemental attribute with the flag
>   set true.
> 
> Then we need to add DW_AT_elemental to the attribute table on page 8
>   
>   DW_AT_elemental	    elemental property of a procedure.
> 
> and give it a value in Fig 19 on page 113, presumably 
> 
>   DW_AT_elemental           0x61      flag
> 




More information about the Dwarf-discuss mailing list