Inconsistent association state for function returning pointer to a type

Inconsistent association state for function returning pointer to a type

The following program compiled with ifort 13.0.1 20121010 returns "T F". Shouldn't the result be "F F"?

program assoc

  type :: abc
  end type abc

  class(abc), pointer :: p

  p => p_new()
  print *, associated(p), associated(p_new())

contains

  function p_new()
    type(abc), pointer :: p_new
    nullify(p_new)
  end function p_new

end program assoc

Best,
Paweł Biernat

3 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.
Portrait de Steve Lionel (Intel)

You are correct - ASSOCIATED is not returning the right result here. I have escalated this as issue DPD200238262 and will let you know of any progress.

Steve
Portrait de Steve Lionel (Intel)

I expect the fix for this to appear in Update 3.

Steve

Connectez-vous pour laisser un commentaire.