[J3] [EXTERNAL] Re: Question regarding valid set of values
Clune, Thomas L. (GSFC-6101)
thomas.l.clune at nasa.gov
Mon May 24 13:15:23 UTC 2021
I've nothing to add about legality, but ... I checked just a couple of compilers, and they all seem to loop forever. I'd have thought at -O3 that some would delete the loop as it produces no output, but that was also not the case. So then I switched to
Program foo
n = huge(n)
do i = 0, n
end do
end
Here one compiler completed immediately even at -O0, while the other still looped forever.
On 5/24/21, 6:31 AM, "J3 on behalf of Thomas König via J3" <j3-bounces at mailman.j3-fortran.org on behalf of j3 at mailman.j3-fortran.org> wrote:
On 21.05.21 08:17, Malcolm Cohen via J3 wrote:
> I really would prefer the standard to be a lot more specific in this
> area, but it is far from the top of my list of inadequacies that I’d
> like to see fixed. If anyone else wants to knock themselves out
> rigorously defining what is and isn’t allowed, and what the results of
> intrinsics operations are, go right ahead! I don’t think it is as easy
> as it looks though, and getting general agreement for a big change of
> wording with little or no technical effect is likely tough. As they say,
> “if it ain’t broke...”
There are a few point which might get clarified along the way.
For example, I am currently not sure if
program foo
integer :: i
do i=0,huge(i)
end do
end
is legal or not (as long as the value of i is not subsequently used).
More information about the J3
mailing list