On Mon, Jan 8, 2018 at 1:23 AM, Thomas Koenig <tkoe...@netcologne.de> wrote: > Hello world, > > the attached patch is a step towards the implementaion of the BACK > argument for the MINLOC and MAXLOC intrinsics, a part of F2008. > This readies the ABI for a later date.
Makes sense. > In order to avoid combinatrorial explosion in the library, I have > opted to always add the BACK argument to the library version. > The additional overhead should be small, this is only a scalar > LOGICAL. We currently have 216 versions of minloc in the library, > I don't want this to be 432 :-) Yes, I agree. > Of course, the actual implementation of BACK is still missing, as > are the standard-dependent checks. This will be done at a later > date. In this version, the library functions always get a .false. > value, which is equivalent to the current behavior. > > Regression-tested. OK for trunk? If I understand it correctly, in the library the back argument is always a LOGICAL(kind=4). But in the frontend, the back argument is coerced to gfc_default_logical_kind. So this doesn't work if one uses the -fdefault-integer-8 option, because then gfc_default_logical_kind will be 8. I suggest you create a constant "gfc_logical4_kind" and use that in the frontend. -- Janne Blomqvist