option to check that arguments to PACK conform?
Paul Thomas
paulthomas2@wanadoo.fr
Fri Nov 10 18:58:00 GMT 2006
Steve,
> FX and I briefly discussed this. I think we want two functions.
> In iresolve.c, we would have code of the form
>
> gfc_resolve_reshape(....) {
>
> if (boundscheck) {
> Set up _gfortran_reshape_checking.
> } else {
> Use current unchanged code _gfortran_reshape
> }
> }
>
> The idea is that if the frontend needs to give the *_checking
> routines additional info, we can do it like I did for rrspacing
> and spacing.
>
>
I wonder if it would not be better to do the conformance checking in
trans-intrinsic.c(gfc_conv_intrinsic_function_call) itself; or in a
subsidiary function?
The reason that I suggest this is that it avoids any modifications to
the library, either by adding a conformance check flag to the arguments
or by doubling up of the library functions.
It should be easy enough to write a function that generates code to
check the shapes of arrays - in fact, I volunteer to do it myself :-)
Best regards
Paul
More information about the Fortran
mailing list