------- Comment #1 from burnus at gcc dot gnu dot org  2007-07-19 08:30 -------
For the accept-invalid part (c_loc of an assumed-shape array). The standard
says:
"X shall either
 (1) have interoperable type and type parameters and be
   (a) a variable that has the TARGET attribute and is interoperable,"

This variable has the TARGET attribute, but is not interoperable:
"An array Fortran variable is interoperable if its type and type parameters are
interoperable and it is of explicit shape or assumed size."

Thus this error by NAG f95 is ok; however, as it is accepted by ifort, g95 and
(currently) gfortran. As I completely fail to see any valid use of it and see
several cases where it seems to work but one uses in reality the wrong array
element, I favour to not allowing it even for -std=gnu. But if one finds a
valid use, I'm also fine with an error only for -std=f2003.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32804

Reply via email to