Fix libgomp Fortran tests

Paul Brook paul@codesourcery.com
Fri Sep 8 16:38:00 GMT 2006


> > To avoid the runtime penalty in computations of checking for that absurd
> > case, I think its better to just not allow it and stick with the standard
> > which defines symmetrical integers.
>
> But, if you restrict the set of permitted integer values to a symmetric
> set, then by that same logic (and application of 7.1.7, "The execution
> of any numeric operation whose result is not defined by the arithmetic
> used by the processor is prohibited."), the subtraction operator should
> throw a runtime error on HUGE(I)-1.

There is no requirement for a runtime error. The prohibition you mention above 
is a requirement placed on the user writing the code, not the compiler.

The compiler is only required to diagnose constraint violations. It can do 
whatever it wants with other illegal code. There are many restrictions 
specified by the standard that not possible or extremely inconvenient to 
enforce with a hard error.

Paul



More information about the Fortran mailing list