Commit 0a8c9a13 by Paul Thomas

re PR fortran/44596 ([OOP] Dynamic dispatch uses broken types)

2010-07-05  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/44596
	* trans-types.c (gfc_get_derived_type): Derived type fields
	with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
	but build_pointer_type_for_mode must be used for this.

From-SVN: r161848
parent 88e06841
2010-07-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/44596
* trans-types.c (gfc_get_derived_type): Derived type fields
with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
but build_pointer_type_for_mode must be used for this.
2010-07-05 Nathan Froyd <froydnj@codesourcery.com> 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
* trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree. * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
......
...@@ -2154,7 +2154,8 @@ gfc_get_derived_type (gfc_symbol * derived) ...@@ -2154,7 +2154,8 @@ gfc_get_derived_type (gfc_symbol * derived)
/* vtype fields can point to different types to the base type. */ /* vtype fields can point to different types to the base type. */
if (c->ts.type == BT_DERIVED && c->ts.u.derived->attr.vtype) if (c->ts.type == BT_DERIVED && c->ts.u.derived->attr.vtype)
TYPE_REF_CAN_ALIAS_ALL (field_type) = true; field_type = build_pointer_type_for_mode (TREE_TYPE (field_type),
ptr_mode, true);
field = gfc_add_field_to_struct (&fieldlist, typenode, field = gfc_add_field_to_struct (&fieldlist, typenode,
get_identifier (c->name), get_identifier (c->name),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment