OSDN Git Service

2010-05-17 Janus Weil <janus@gcc.gnu.org>
authorjanus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 May 2010 19:58:48 +0000 (19:58 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:11:01 +0000 (14:11 +0900)
PR fortran/43990
* trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
This is now handled via 'gfc_class_null_initializer'.

2010-05-17  Janus Weil  <janus@gcc.gnu.org>

PR fortran/43990
* gfortran.dg/class_21.f03: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159511 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog

index 45fe11a..a6d2925 100644 (file)
@@ -1,5 +1,11 @@
 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
 
+       PR fortran/43990
+       * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
+       This is now handled via 'gfc_class_null_initializer'.
+
+2010-05-17  Janus Weil  <janus@gcc.gnu.org>
+
        * class.c (gfc_add_component_ref,gfc_class_null_initializer,
        gfc_build_class_symbol,add_proc_component,add_proc_comps, 
        add_procs_to_declared_vtab1,copy_vtab_proc_comps,
index 4d48c05..b7a296d 100644 (file)
@@ -4337,20 +4337,7 @@ gfc_conv_structure (gfc_se * se, gfc_expr * expr, int init)
       if (!c->expr || cm->attr.allocatable)
         continue;
 
-      if (cm->ts.type == BT_CLASS && !cm->attr.proc_pointer)
-       {
-         gfc_component *data;
-         data = gfc_find_component (cm->ts.u.derived, "$data", true, true);
-         if (!data->backend_decl)
-           gfc_get_derived_type (cm->ts.u.derived);
-         val = gfc_conv_initializer (c->expr, &cm->ts,
-                                     TREE_TYPE (data->backend_decl),
-                                     data->attr.dimension,
-                                     data->attr.pointer);
-
-         CONSTRUCTOR_APPEND_ELT (v, data->backend_decl, val);
-       }
-      else if (strcmp (cm->name, "$size") == 0)
+      if (strcmp (cm->name, "$size") == 0)
        {
          val = TYPE_SIZE_UNIT (gfc_get_derived_type (cm->ts.u.derived));
          CONSTRUCTOR_APPEND_ELT (v, cm->backend_decl, val);
index dfd3823..683050b 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-17  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/43990
+       * gfortran.dg/class_21.f03: New.
+
 2010-05-17  Jason Merrill  <jason@redhat.com>
 
        PR c++/44157