[Dwarf-discuss] F9x elemental procedures

James Cownie jcownie
Tue Jun 7 09:53:22 GMT 2005


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

-- Jim
James Cownie	<jcownie at etnus.com>
Etnus, LLC.     +44 117 9071438

More information about the Dwarf-discuss mailing list