Found in the README to
http://www.lrz-muenchen.de/services/software/mathematik/gsl/fortran/

gfortran is quite picky with regards to the C binding type, i.e. it does not
like

   use iso_c_binding
   complex(c_double),target :: z   ! correct would be: c_double_complex

however it is not failing right a way, but it is only failing when using
C_LOC:
   type(c_ptr) :: ptr
   ptr = c_loc(z)

Error: C kind parameter is for type REAL but symbol 'z' at (1) is of type
COMPLEX

ISSUES:

a) The error should already printed for the declaration and not for C_LOC()
(The same checking is also done for the dummy arguments of BIND(C) procedures.)

b) The question is whether one needs an error or whether a warning is enough

(For completeness, the author did not reply to my request to change the code of
FGLS.)


-- 
           Summary: C Binding: Kind parameter checking too strict and too
                    late
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38160

Reply via email to