J3/05-147r2 To: J3 From: Bill Long/HPC Subject: New Intents Date: 10-Feb-2005 At M167, this idea got a Hate .. Love score of 4 - 2 - 5 - 1. However, we think it's worth pursuing for the potential performance benefits. Number: Title: New Intents Submitted By: J3 Status: For Consideration References: J3/04-135 Basic Functionality: ------------------- Add a new intent for dummy arguments: INTENT(SCRATCH) specifies that the dummy argument is undefined on entry and return. The argument may be used for scratch work space only. Compilers may be able to optimize this argument aggressively. Rationale: ---------- Many older Fortran programs have dummy arguments which are used for scratch work space only. Any use of existing argument intents gives wrong information to the compiler. Also, in the process of converting scratch work arrays in common blocks to allocatable dummy arguments, there is no proper intent for 'scratch' variables. An optimizing compiler could scalarize a dummy argument array known to be scratch. Also, final values of the dummy argument do not need to be stored. Estimated Impact: ----------------- The impact was rated as 5 on the John Reid scale at 167. Lowered to 4 at meeting 171. Detailed Specification: ----------------------- A new INTENT(SCRATCH) attribute is proposed. The actual argument associated with a dummy argument with the INTENT(SCRATCH) attribute shall be definable. The dummy argument is undefined upon entry to the procedure and becomes undefined upon exit from the procedure. History: J3/04-135 at M167