call c_f_pointer

call c_f_pointer

Upgraded to later version of Intel Fortran compiler. i now receive error:

There is no matching specific subroutine for this generic subroutine call.   [C_F_POINTER]
          call c_f_pointer(gfld%discipline,grbdisc)

Here is my code:

use m_gribfield

use, intrinsic:: iso_c_binding

type(gribfield), pointer:: gfld

Any thoughts? The previous linux compiler was 2011.3.174, and it compiles ok with that. I included the structure below.

Fichier attachéTaille
Télécharger gribmod.f7.86 Ko
2 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

gfld%discipline is integer(g2int). This argument is required to be type(c_ptr). I don't know how you have declared grbdisc.

As it happened, we tightened up C_F_POINTER (and C_F_PROCPOINTER) in this regard in Update 4 to Composer XE 2011, so you had just missed the change in the earlier compiler.

You may need to use TRANSFER, though I will caution you that you've hardwired 32-bitness into this code and it will be very wrong if you build for x64.

Steve - Intel Developer Support

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui