Ilya Enkovich wrote:
The issue is that users do not get what expect. I do not want someone
having mixed codes get instrumentation for his Java/Fortran/Ada
functions which slows them down and does nothing useful. What is the
point to allow checks of pointer bounds for language with no pointers?
Talking about Fortran, I wonder which modifications are required to get
it working. Can you give some pointers? I lost a bit track.
(For readers, who haven't followed: See
http://gcc.gnu.org/wiki/Intel_MPX_support_in_the_GCC_compiler )
In Fortran, often an array is described by an array descriptor, a struct
which carries both the pointer address and the array bounds. Thus, that
makes it simpler to check for bound violations at runtime (existing
-fcheck=bounds). However, arrays can also be passed as in a way that
only the address is known – in that case, one has the same issues as
with C. One place where the issue occurs is interoperating with C, but
also within Fortran it can occur. I think especially for
interoperability with C (C++ with extern "c", etc.), having the checks
would be useful.
I have to admit that it is not completely clear to me when to best add
MPX annotations with Fortran, but as it is explicitly controlled by a
compile-time flag, there is no real reason for not using it.
Tobias