#125 F95 binding assumes INTEGER == int


In much of the F95 binding (and probably the F77 as well), integers are declared without a kind parameter. This will result in incorrect results for compilers where the C int type and the Fortran default integer are not of the same length (e.g. the 64-bit version of g95).

strutil.f90 will not compile on such a system as the islen function is declared as integer*4 in one place and default integer in another.

I would suggest, defining a plint kind that is set to be equal to c_int from iso_c_binding for f95+. For f77 probably the only viable fix is to declare all integers to be integer*4.


  • Arjen Markus

    Arjen Markus - 2012-12-19

    This is well worth looking into as 64-bits systems are gaining popularity. I will have a
    look at this.

    Would you happen to have a system where this can be tested?

  • James Tappin

    James Tappin - 2012-12-19

    I have a system that I can try things on, but not externally accessible (it's a VM on a box with a dynamic IP).


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks