aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-08-12 08:33:15 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-08-12 08:33:15 +0000
commit64754ed578905416836c748cf442eb380996d980 (patch)
tree3157f35f3613f054569a9adf317ac83c78ed3822 /gcc
parent12d74f0d0d7a9697ba2f446c5efe2dd8cd6c0bc6 (diff)
downloadgcc-64754ed578905416836c748cf442eb380996d980.zip
gcc-64754ed578905416836c748cf442eb380996d980.tar.gz
gcc-64754ed578905416836c748cf442eb380996d980.tar.bz2
trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL.
2009-08-12 Richard Guenther <rguenther@suse.de> * trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL. From-SVN: r150676
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog4
-rw-r--r--gcc/fortran/trans-types.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 999de40..5674907 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index 92373e1..4b19871 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);