Hi Paul,
By the way, the standard just specifies integer for 'dim' in reduce, which I take to mean it should be default_integer_kind.
Hmm... I'm not sure that this is actually the case; I believe it can actually be any integer kind, although anything larger than default integer would be kind of funny, or a funny kind, so what is passed to the library after conversion is whatever we chose it to be. But you implemented the conversion to default integer when calling the library, so I do not see a problem there.
I didn't see any obvious way of finding that in the library. Could somebody on the list advise, please?
That is always 4, unless the user directed us to do something horrible; see gfc_init_kinds(). Maybe we could use a constant like "GFC_DEFAULT_DEFAULT_INTEGER_KIND" for calling library functions to avoid the potential mess with -fdefault-integer=... Best regards Thomas