------- Comment #2 from burnus at gcc dot gnu dot org  2010-02-28 22:29 -------
(In reply to comment #1)
> It boils down to understand what makes data-ref polymorphic

Answer: "A polymorphic entity is a data entity that is able to be of differing
types during program execution." (F2003, "5.1.1.2 CLASS")

Thus "somethings%class" is valid as this entity can have different types; by
contrast, "class%non_class" is not polymorphic as the last part-ref is always
of the type of non_class.

 * * *

Thus, one needs to reject:
  ptr => abstract_non_polymorph
  abstract_non_polymorph = something
  something = abstract_non_polymorph
  call fooBar(abstract_non_polymorph)
which can presumably best be done in gfc_match_varspec.


-- 


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

Reply via email to