aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2010-08-01 21:21:49 +0200
committerJanus Weil <janus@gcc.gnu.org>2010-08-01 21:21:49 +0200
commitf3f98a1e513a34b3de6a46ef732d02c2a14a6a3e (patch)
treed126ebbe2b9edcbf2625ee091a4729a1fbf99798 /gcc/fortran/module.c
parent47dad3ff97135ef8a26e0ecbc2170fba6c4e89be (diff)
downloadgcc-f3f98a1e513a34b3de6a46ef732d02c2a14a6a3e.zip
gcc-f3f98a1e513a34b3de6a46ef732d02c2a14a6a3e.tar.gz
gcc-f3f98a1e513a34b3de6a46ef732d02c2a14a6a3e.tar.bz2
re PR fortran/44912 ([OOP] Segmentation fault on TBP)
2010-08-01 Janus Weil <janus@gcc.gnu.org> PR fortran/44912 * class.c (gfc_build_class_symbol): Make '$vptr' component private. (gfc_find_derived_vtab): Make vtabs and vtypes public. * module.c (read_module): When reading module files, always import vtab and vtype symbols. 2010-08-01 Janus Weil <janus@gcc.gnu.org> PR fortran/44912 * gfortran.dg/typebound_call_17.f03: New. From-SVN: r162804
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 426a17c..d68e868 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -4370,6 +4370,11 @@ read_module (void)
if (p == NULL && strcmp (name, module_name) == 0)
p = name;
+ /* Exception: Always import vtabs & vtypes. */
+ if (p == NULL && (strcmp (xstrndup (name,5), "vtab$") == 0
+ || strcmp (xstrndup (name,6), "vtype$") == 0))
+ p = name;
+
/* Skip symtree nodes not in an ONLY clause, unless there
is an existing symtree loaded from another USE statement. */
if (p == NULL)