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

Bill Long longb
Tue Jul 9 00:05:40 EDT 2013


What about a simple case like this:

subroutine wobbly(N)
   integer,volatile :: N
   real :: A(N + N)
   real :: B(2 *N)

Are you sure that A and B are the same size?  Assuming the compiler does 
not optimize the bound expressions,  is it allowed that the computations 
of N + N and 2*N give different answers if N is volatile?

Cheers,
Bill


On 7/8/13 8:18 PM, Van Snyder wrote:
> On Mon, 2013-07-08 at 18:41 +0000, Lionel, Steve wrote:
>> Why would that be an issue?
>
> If the dummy argument is, say D, and the specification expression
> consists of D, then one could determine what the value of D was at the
> instant the specification expression was used for, say, an array bound
> by using, say, UBOUND(A,1).  If the specification expression is F(D),
> where F is some arbitrary specification function, it might be a bit
> tricky to invert F to discover what value D had when F(D) was computed.
>
> Maybe that's not a problem.
>
>>
>> Steve
>>
>> -----Original Message-----
>> From: j3-bounces at mailman.j3-fortran.org [mailto:j3-bounces at mailman.j3-fortran.org] On Behalf Of Van Snyder
>> Sent: Monday, July 08, 2013 2:34 PM
>> To: j3
>> Subject: (j3.2006) Question I forgot to bring up at the meeting
>>
>> Do we want to allow a dummy argument with the VOLATILE attribute in a specification expression?
>>
>>
>> _______________________________________________
>> J3 mailing list
>> J3 at mailman.j3-fortran.org
>> http://mailman.j3-fortran.org/mailman/listinfo/j3
>> _______________________________________________
>> J3 mailing list
>> J3 at mailman.j3-fortran.org
>> http://mailman.j3-fortran.org/mailman/listinfo/j3
>
>
> _______________________________________________
> 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