This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, Fortran, OOP] PR 44912: Segmentation fault on TBP


Hi all,

this patch fixes a problem with type-bound procedure calls segfaulting
at runtime. It is fixed by making the vtabs & vtypes public inside a
module, plus making sure that they are imported upon module loading,
even with "use, only" clauses.

[The patch also contains one hunk which makes the '$vptr' component of
the class container private. This had been done for the '$data'
component already, but has been forgotten for '$vptr'. This is not
actually connected to this PR.]

The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk?

Cheers,
Janus



2010-07-31  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-07-31  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/44912
	* gfortran.dg/typebound_call_17.f03: New.

Attachment: pr44912.diff
Description: Binary data

Attachment: typebound_call_17.f03
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]