aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/iresolve.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2010-11-09 11:39:46 +0100
committerJanus Weil <janus@gcc.gnu.org>2010-11-09 11:39:46 +0100
commitb04533af33ccf91e2874b24dd3e678d195c83587 (patch)
tree14d1f54316ef0bc517c72a674952cb7d233fd288 /gcc/fortran/iresolve.c
parent6496e42f8734797b1a5613585c47e51398419547 (diff)
downloadgcc-b04533af33ccf91e2874b24dd3e678d195c83587.zip
gcc-b04533af33ccf91e2874b24dd3e678d195c83587.tar.gz
gcc-b04533af33ccf91e2874b24dd3e678d195c83587.tar.bz2
re PR fortran/46313 ([OOP] class container naming collisions)
2010-11-09 Janus Weil <janus@gcc.gnu.org> PR fortran/46313 * gfortran.h (gfc_add_data_component,gfc_add_vptr_component, gfc_add_hash_component,gfc_add_size_component, gfc_add_def_init_component): New macros. * class.c (gfc_add_component_ref): Renamed data component. (get_unique_type_string): New function. (gfc_build_class_symbol): Use 'get_unique_type_string' to construct uniques names for the class containers. Rename components. (gfc_find_derived_vtab): Use 'get_unique_type_string' to construct uniques names for the vtab symbols. Rename components. * decl.c (attr_decl1): Renamed class container components. * iresolve.c (gfc_resolve_extends_type_of): Ditto. * match.c (select_type_set_tmp): Renamed temporaries. * module.c (read_module): Renamed vtab and vtype symbols. * resolve.c (resolve_structure_cons,resolve_typebound_function, resolve_typebound_subroutine,resolve_deallocate_expr, resolve_select_type,resolve_fl_derived): Renamed class container and vtab components. * trans-array.c (structure_alloc_comps): Ditto. * trans-decl.c (gfc_trans_deferred_vars): Ditto. * trans-expr.c (gfc_conv_derived_to_class,gfc_conv_structure, gfc_trans_class_init_assign,gfc_trans_class_assign): Ditto. * trans-intrinsic.c (gfc_conv_intrinsic_sizeof, gfc_conv_intrinsic_storage_size,gfc_conv_allocated,gfc_conv_associated, gfc_conv_same_type_as): Ditto. * trans-stmt.c (gfc_trans_allocate): Ditto. 2010-11-09 Janus Weil <janus@gcc.gnu.org> PR fortran/46313 * gfortran.dg/class_29.f03: New. From-SVN: r166480
Diffstat (limited to 'gcc/fortran/iresolve.c')
-rw-r--r--gcc/fortran/iresolve.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c
index e7a92da..12854fb 100644
--- a/gcc/fortran/iresolve.c
+++ b/gcc/fortran/iresolve.c
@@ -938,7 +938,7 @@ gfc_resolve_extends_type_of (gfc_expr *f, gfc_expr *a, gfc_expr *mo)
/* Replace the first argument with the corresponding vtab. */
if (a->ts.type == BT_CLASS)
- gfc_add_component_ref (a, "$vptr");
+ gfc_add_vptr_component (a);
else if (a->ts.type == BT_DERIVED)
{
vtab = gfc_find_derived_vtab (a->ts.u.derived);
@@ -954,7 +954,7 @@ gfc_resolve_extends_type_of (gfc_expr *f, gfc_expr *a, gfc_expr *mo)
/* Replace the second argument with the corresponding vtab. */
if (mo->ts.type == BT_CLASS)
- gfc_add_component_ref (mo, "$vptr");
+ gfc_add_vptr_component (mo);
else if (mo->ts.type == BT_DERIVED)
{
vtab = gfc_find_derived_vtab (mo->ts.u.derived);