From 44f117c2425e36b6765a7b8b691d2e6ccbaafc9f Mon Sep 17 00:00:00 2001 From: pault Date: Mon, 5 Jul 2010 19:26:12 +0000 Subject: [PATCH] 2010-07-05 Paul Thomas 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161848 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 7 +++++++ gcc/fortran/trans-types.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 3530c8f3326..621879b5b1b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2010-07-05 Paul Thomas + + 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 * 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 1de624fb819..6f71da8104b 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), -- 2.11.4.GIT