[Patch, Fortran, OOP] PR 54784: [4.7/4.8 Regression] wrong code in polymorphic allocation with SOURCE

Janus Weil janus@gcc.gnu.org
Wed Oct 3 16:48:00 GMT 2012


Hi all,

here is a small patch for a wrong-code regression with polymorphic
allocation. The problem is that we falsely detect the allocation
variable to be a polymorphic array (although it is a scalar). For
further details see the PR, in particular comment 4.

Regtested on x86_64-unknown-linux-gnu. Ok for trunk and 4.7?

Cheers,
Janus


2012-10-03  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/54784
	* trans-stmt.c (gfc_trans_allocate): Correctly determine the reference
	to the _data component for polymorphic allocation with SOURCE.

2012-10-03  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/54784
	* gfortran.dg/class_allocate_13.f90: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr54784.diff
Type: application/octet-stream
Size: 689 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121003/21493a3c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: class_allocate_13.f90
Type: application/octet-stream
Size: 558 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121003/21493a3c/attachment-0001.obj>


More information about the Gcc-patches mailing list