+2011-01-04 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/46448
+ * class.c (gfc_find_derived_vtab): Set the module field for the copying
+ routine to make sure it receives module name mangling.
+
2011-01-03 Jakub Jelinek <jakub@redhat.com>
* gfortranspec.c (lang_specific_driver): Update copyright notice
sub_ns->proc_name = copy;
copy->attr.flavor = FL_PROCEDURE;
copy->attr.if_source = IFSRC_DECL;
+ if (ns->proc_name->attr.flavor == FL_MODULE)
+ copy->module = ns->proc_name->name;
gfc_set_sym_referenced (copy);
/* Set up formal arguments. */
gfc_get_symbol ("src", sub_ns, &src);
+2011-01-04 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/46448
+ * gfortran.dg/class_34.f90: New.
+
2011-01-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* gcc.dg/torture/builtin-cproj-1.c: On the __SPU__ target, do not
--- /dev/null
+! { dg-do compile }
+!
+! PR 46448: [4.6 Regression] [OOP] symbol `__copy_...' is already defined
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+module m0
+ type :: t
+ end type
+end module
+
+module m1
+ use m0
+ class(t), pointer :: c1
+end module
+
+module m2
+ use m0
+ class(t), pointer :: c2
+end module
+
+end
+
+! { dg-final { cleanup-modules "m0 m1 m2" } }