On 2016-11-23 12:40-0000 Arjen Markus wrote: > Hi Hazen, > > > > I see ... this is really a problem of the older version of gfortran. I tried > the code below with version 5.4, just to make sure: > > > > module passing_c > > use iso_c_binding > > > > implicit none > > contains > > subroutine pass_array( array ) > > integer, dimension(:), target :: array > > > > call pass_it( c_loc(array) ) > > end subroutine pass_array > > end module passing_c > > > > and got no error messages or warnings at all. > > > > What happens if you add the bind(c) attribute, like: > > integer, dimension(:), target, bind(c) :: array > > > It is not the nicest solution, but maybe that will solve the problem. > > Regards, > > Arjen
Hi Arjen: Just to interject, you have been tempted before to go down this road of attempting to support gfortran-4.8. But I have always argued against that for the following reasons: We may never get that support to work properly. Adding such support introduces complexity into our new Fortran binding. gfortran-4.9 works beautifully, and modern Linux (and other) software distributions typically provide substantially higher versions than 4.9. So I assume those who are stuck with gfortran-4.8 or lower are a small and rapidly shrinking fraction of our potential Fortran users. So from the above considerations I believe we should address this issue by simply stating in the release notes that gfortran-4.8 does not work (unless the user specifies our old binding and examples using -DPL_DEPRECATED_f95=ON) and therefore gfortran-4.9 is the minimum version we support in undeprecated fashion going forward. @Hazen: Just for fun with all this testing power at your fingertips, do you want to specify -DPL_DEPRECATED_f95=ON for your gfortran-4.8 test to really make sure that works like I claim above? Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel