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


> -----Original Message-----
> From: Hazen Babcock [mailto:hbabc...@mac.com]
> Sent: Wednesday, November 23, 2016 1:11 PM
> To: Arjen Markus
> Cc: PLplot development list
> Subject: Re: [Plplot-devel] Continuous Integration
>
>
>
> On 11/23/2016 02:52 AM, Arjen Markus wrote:
> >
> > Nevertheless, do you have an error report for gfortran 4.8? We have
> > seen a few issues when we started on this, but I do not remember
> > whether they were serious and with the newer version they have
> > disappeared. (The NAG compiler is rather picky about not following the
> standard ;)).
>
> It looks like 4.8.5? If you go to the Travis page you can see the logs for 
> all of the
> builds that I tried (click on "Build History"). Here is one example of a 
> build that failed
> because of fortran95:
>
> https://travis-ci.org/HazenBabcock/PLplot/jobs/178182917
>
> All the error messages are some form of:
>
> included_plplot_real_interfaces.f90:2502.25:
>
>      Included at
> /home/travis/build/HazenBabcock/PLplot/bindings/f95/plplot_double.f90:117:
>
>                     c_loc(plotentries), size(plotentries,
> kind=private_plint) )
>
>                           1
>
> Error: Assumed-shape array 'plotentries' at (1) cannot be an argument to the
> procedure 'c_loc' because it is not C interoperable
>
> -Hazen

DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited. 
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.
------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to