trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL.
authorRichard Guenther <rguenther@suse.de>
Wed, 12 Aug 2009 08:33:15 +0000 (08:33 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 12 Aug 2009 08:33:15 +0000 (08:33 +0000)
2009-08-12  Richard Guenther  <rguenther@suse.de>

* trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL.

From-SVN: r150676

gcc/fortran/ChangeLog
gcc/fortran/trans-types.c

index 999de40..5674907 100644 (file)
@@ -1,3 +1,7 @@
+2009-08-11  Richard Guenther  <rguenther@suse.de>
+
+       * trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL.
+
 2009-08-11  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/41022
index 92373e1..4b19871 100644 (file)
@@ -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);