]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
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 999de40d7895371b6b04c7f954f9dede57a25ad6..5674907dec4fe6c7de2ffe12ddb5695ffa1bb5bd 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 92373e1b1a2d65eb4602711a676270bd537a865e..4b198717ffcb581e186194385d2c985420d5fe73 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);