aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2010-07-05 19:26:12 +0000
committerPaul Thomas <pault@gcc.gnu.org>2010-07-05 19:26:12 +0000
commit0a8c9a137937a9da06119d45370037ce788d7eeb (patch)
tree5ba17a0cd7868a6e4b7c2504e2526b17aeb677d6 /gcc
parent88e06841144bd5612bc3411a657094c2fb39575f (diff)
downloadgcc-0a8c9a137937a9da06119d45370037ce788d7eeb.zip
gcc-0a8c9a137937a9da06119d45370037ce788d7eeb.tar.gz
gcc-0a8c9a137937a9da06119d45370037ce788d7eeb.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/trans-types.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 3530c8f..621879b 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,10 @@
+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>
* trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index 1de624f..6f71da8 100644
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -2154,7 +2154,8 @@ gfc_get_derived_type (gfc_symbol * derived)
/* vtype fields can point to different types to the base type. */
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,
get_identifier (c->name),