This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: option to check that arguments to PACK conform?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]