[Patch, Fortran] PR42257: [OOP] Compiler segmentation fault due missing public statement

Janus Weil janus@gcc.gnu.org
Fri Dec 11 17:46:00 GMT 2009


Hi all,

here is a simple patch for an issue related to module loading/writing
and type extension. The problem is that 'write_derived_extensions'
writes all extensions of a type to the module file, without checking
if they are private. This creates trouble in reading the module file,
when one tries to load the private symbol.

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

Cheers,
Janus


gcc/fortran/
2009-12-11 Janus Weil  <janus@gcc.gnu.org>

	PR fortran/42257
	* module.c (write_dt_extensions): Check for accessibility.

gcc/testsuite/
2009-12-11  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/42257
	* gfortran.dg/extends_9.f03: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr42257.diff
Type: application/octet-stream
Size: 469 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091211/1d57e3a8/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extends_9.f03
Type: application/octet-stream
Size: 710 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091211/1d57e3a8/attachment-0001.obj>


More information about the Fortran mailing list