[Patch, Fortran, OOP] PR 50225: The allocation status for polymorphic allocatable function results is not set properly

Janus Weil janus@gcc.gnu.org
Mon Aug 29 20:28:00 GMT 2011


Hi all,

here is a relatively simple patch which fixes the PR in the subject
line. The problem was: For functions with polymorphic allocatable
result, the result variable was not nullified at the start.

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

Cheers,
Janus


2011-08-29  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/50225
	* trans-decl.c (gfc_generate_function_code): Nullify polymorphic
	allocatable function results.

2011-08-29  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/50225
	* gfortran.dg/class_result_1.f03: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr50225.diff
Type: text/x-diff
Size: 1407 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20110829/747fb056/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: class_result_1.f03
Type: application/octet-stream
Size: 1299 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20110829/747fb056/attachment.obj>


More information about the Fortran mailing list