On Sun, Mar 23, 2025 at 10:09:46AM +0100, Thomas Koenig wrote: > 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.
Yes, 'dim' can be an integer of any kind. In section 16, if there is a specific kind requirement, then it would have stated that 'dim' had a default integer kind. See for example, 16.9.169 RANDOM_SEED([SIZE, PUT, GET]) where one has SIZE (optional) shall be a default integer scalar. > > 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=... We could remove of the -fdefault-* options. Problem solved. -- Steve