Hi Ram,
This is a very good question. I'm not an expert in interpreting the Fortran standard, but perhaps we're okay here:
[begin snippets from the spec (
http://www.j3-fortran.org/doc/year/10/10-007.pdf)]
4.1.2 Set of values
For each type, there is a set of valid values. The set of valid values for logical is completely determined by this
part of ISO/IEC 1539. The sets of valid values for integer, character, and real are processor dependent...
4.4.2.2 Integer type
The set of values for the integer type is a subset of the mathematical integers. The processor shall provide one or
more representation methods that define sets of values for data of type integer... The integer type includes a zero value, which is
considered to be neither negative nor positive. The value of a signed integer zero is the same as the value of an
unsigned integer zero.
7.1.5.2.4 Evaluation of numeric intrinsic operations
The execution of any numeric operation whose result is not defined by the arithmetic used by the processor is
prohibited. Raising a negative-valued primary of type real to a real power is prohibited.
[end snippets from the spec]
So, as far as I can tell, we get to define the processor's arithmetic however we want, and so we're free to define it to not have well-defined wrapping semantics.
-Hal
> --
> You received this message because you are subscribed to the Google
> Groups "flang-dev" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
flang-dev+...@googlegroups.com .
> To post to this group, send email to
flan...@googlegroups.com .
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/flang-dev/6b45cf1e-3526-405d-86f7-229c3e90d589%40googlegroups.com
> .
> For more options, visit
https://groups.google.com/d/optout .
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory