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 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

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

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

Steve

登陆并发表评论。