LKedward / fhash

fpm package implementing a hash table with support for generic keys and values.
https://lkedward.github.io/fhash/
MIT License
38 stars 8 forks source link

GNU extension: Different type kinds #16

Closed jhaiduce closed 1 year ago

jhaiduce commented 1 year ago

fhash_tbl.f90 contains several calls to the modulo intrinsic function in which different integer kinds are passed, which is not allowed per the Fortran 2008 standard.

If the code is compiled using gfortran with the -std=f2008 option set the following errors are issued:

src/fhash_tbl.f90:298:28:

  298 |   index = modulo(key%hash(),size(tbl%buckets)) + 1
      |                            1
Error: GNU Extension: Different type kinds at (1)
src/fhash_tbl.f90:245:28:

  245 |   index = modulo(key%hash(),size(tbl%buckets)) + 1
      |                            1
Error: GNU Extension: Different type kinds at (1)
src/fhash_tbl.f90:165:28:

  165 |   index = modulo(key%hash(),size(tbl%buckets)) + 1
      |                            1
Error: GNU Extension: Different type kinds at (1)
src/fhash_tbl.f90:133:28:

  133 |   index = modulo(key%hash(),size(tbl%buckets)) + 1
      |                            1
Error: GNU Extension: Different type kinds at (1)