aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/gfortran.h
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/gfortran.h
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/gfortran.h')
-rw-r--r--gcc/fortran/gfortran.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index 2d0d4eb..13dbbc6 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -2877,6 +2877,11 @@ gfc_try gfc_check_same_strlen (const gfc_expr*, const gfc_expr*, const char*);
/* class.c */
void gfc_add_component_ref (gfc_expr *, const char *);
+#define gfc_add_data_component(e) gfc_add_component_ref(e,"_data")
+#define gfc_add_vptr_component(e) gfc_add_component_ref(e,"_vptr")
+#define gfc_add_hash_component(e) gfc_add_component_ref(e,"_hash")
+#define gfc_add_size_component(e) gfc_add_component_ref(e,"_size")
+#define gfc_add_def_init_component(e) gfc_add_component_ref(e,"_def_init")
gfc_expr *gfc_class_null_initializer (gfc_typespec *);
gfc_try gfc_build_class_symbol (gfc_typespec *, symbol_attribute *,
gfc_array_spec **, bool);