(j3.2006) Question I forgot to bring up at the meeting

Bill Long longb
Tue Jul 9 19:25:57 EDT 2013



On 7/9/13 5:56 PM, Van Snyder wrote:
> On Tue, 2013-07-09 at 10:33 -0500, Bill Long wrote:
>> If we want to allow VOLATILE variables in specification expressions,
>> either we should warn the users about curious effects, or say that for
>> the purposes of its use in a specification expression, treat the
>> variable as if it did not have the VOLATILE attribute. Alternatively,
>> just disallow it, an option that I think was implied by Van's original
>> post.
>
> Either way, we need words in the standard.
>
> Can we handle this via an interp, such as the following?

Seems reasonable.

>
> QUESTION:
>
> Does the standard require that the following subroutine
>
>    subroutine Wobbly ( N )
>      integer, intent(in), volatile :: N

The INTENT(IN) has to be removed here.  C559.

Cheers,
Bill

>      integer :: A ( n + n )
>      integer :: B ( 2 * n )
>      print *, size(a) == size(b)
>    end subroutine Wobbly
>
> always print "T"?
>
> ANSWER:
>
> The standard does not establish an interpretation for this subprogram.
> It therefore does not conform to the standard.  This was not intended.
> Edits are provided.
>
> EDITS:
>
> Either add something about the unpredictable effects of using variables
> with the volatile attribute in specification expressions, or prohibit
> them.
>
> Or do we need to add it to the work plan for the 2020 standard?
>
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
>

-- 
Bill Long                                           longb at cray.com
Fortran Technical Support    &                 voice: 651-605-9024
Bioinformatics Software Development            fax:   651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101





More information about the J3 mailing list