From 64754ed578905416836c748cf442eb380996d980 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 12 Aug 2009 08:33:15 +0000 Subject: [PATCH] trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL. 2009-08-12 Richard Guenther * trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL. From-SVN: r150676 --- gcc/fortran/ChangeLog | 4 ++++ gcc/fortran/trans-types.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 999de40d7895..5674907dec4f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2009-08-11 Richard Guenther + + * trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL. + 2009-08-11 Janus Weil PR fortran/41022 diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 92373e1b1a2d..4b198717ffcb 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -2123,7 +2123,8 @@ gfc_get_derived_type (gfc_symbol * derived) /* Now we have the final fieldlist. Record it, then lay out the derived type, including the fields. */ TYPE_FIELDS (typenode) = fieldlist; - TYPE_CANONICAL (typenode) = canonical; + if (canonical) + TYPE_CANONICAL (typenode) = canonical; gfc_finish_type (typenode); gfc_set_decl_location (TYPE_STUB_DECL (typenode), &derived->declared_at); -- 2.47.2