(j3.2006) (SC22WG5.4911) [ukfortran] Comment on a comment on the WG5 letterballot on N1947

Malcolm Cohen malcolm
Fri Jan 18 01:41:22 EST 2013


Ian Chivers wrote:
> There have also been processors that have supported
> integer overflow detection.

Bill Long replied:
>Yes, I recall the VAX had this.  Interesting, though, that the feature seems to 
>have not caught on.

Seeing as the capability is in the x86 family (which powers a number of Cray 
designs), it has caught on quite well it seems to me - even on HPC machines. 
That it is not used by most current compilers speaks, IMO, more of the 
programming culture promoted by C than of missing hardware; the x86 support does 
require some extra code to be generated, but then so does subscript error 
detection and most compilers offer that.

>a serious performance hit, of course.  But you would do this only for debugging

Yes there is a performance hit, though not as big as doing it in software with 
no hardware support.  But "having the capability to detect" is what would be 
asked, not requiring detection all the time.

Whether this should be exposed at the programming level, perhaps by something 
not entirely unlike John's ENABLE block, is an interesting question; IMO that 
could be a good idea provided its effects did not propagate down or up i.e. was 
only within the lexical block.

However, interesting though all these discussions are, doing anything about this 
in F2015 is certainly out of the question so we are getting a bit ahead of 
ourselves.  It might be better considered as a part of a "High Reliability 
Fortran" package at some indeterminate time in the future though.

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo. 




More information about the J3 mailing list