(j3.2006) (SC22WG5.5066) [ukfortran] J3 work plan
Bill Long
longb
Tue Aug 6 08:59:30 EDT 2013
Avoiding GOTO statements and statement numbers helps the compiler
analyze data flow in the code. Arithmetic IF statements require
statement numbers and are, basically, a set of 3 GOTO statements, one of
which is executed.
However, as Malcolm noted, compiler issues were not the main motivation
for taking aim at arithmetic IF statements. They are problematic when
the test is on a REAL value since the value could be not a number, or
the test is implementation-dependent when the value is too close to
zero. For example, implementations that support denormal values behave
different from ones that always flush underflows to zero. The
arguments are similar to why we deleted using REAL values for DO loop
indices and limits. Arguably, these issues are not relevant if the
test value in the arithmetic IF is integer. But it does not really make
sense to modify the feature with that limitation at this point. There
are better ways to write the code today.
Cheers,
Bill
On 8/5/13 11:31 PM, Keith Bierman wrote:
> I seem to have forgotten, how does tossing arithmetic IF simplify the
> compilation system in significant ways? (Not to argue for use,
> continued, past etc.).
>
> Implementers can feel free to educate me offline if they prefer.
>
> Keith Bierman
> khbkhb at gmail.com <mailto:khbkhb at gmail.com>
> kbiermank AIM
> 303 997 2749
>
>
> On Mon, Aug 5, 2013 at 10:21 PM, Van Snyder <van.snyder at jpl.nasa.gov
> <mailto:van.snyder at jpl.nasa.gov>> wrote:
>
> On Tue, 2013-08-06 at 12:30 +0900, Malcolm Cohen wrote:
> > One might have thought that Arithmetic IF ought to have been frowned
> > on in their style guides for the last 35 years too, for fairly
> obvious
> > reasons.
>
> Many of these codes began development in FORTRAN IV, well before it was
> standardized in 1966. In newer developments, arithmetic IF was
> discouraged, and indeed rarely used. The already-deleted features were
> sufficiently rarely used that it was possible to replace them, but
> arithmetic IF was pervasive. Funding for maintenance for these codes
> has continually dwindled. Even funding for new development for, say,
> the uniquely-challenging entry, descent and landing for the Mars Science
> Laboratory, was sketchy.
>
> Malcolm can criticize their practices and second-guess their decisions
> if he wants to, but that doesn't wish their problems away. He might
> have better success writing, as a British Subject living in Japan, to
> the US Congress, urging sufficient funding to cope with these problems.
> We haven't had much success, especially since the Golden Age of Goldin.
>
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org <mailto: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