[Patch, Fortran, OOP] PR 43388: [F2008] ALLOCATE with MOLD=

Janus Weil janus@gcc.gnu.org
Tue Jun 15 01:39:00 GMT 2010


Hi all,

>>> So, what does that mean for the implementation? One can argue that we
>>> don't need an expr4 if SOURCE and MOLD cannot appear together. But
>>> then, if I put either of them into expr3, what is the best way to
>>> distinguish between SOURCE and MOLD at resolution stage? I guess I
>>> could just put a one-bit flag 'mold' into gfc_code.ext.alloc. Any
>>> better ideas?
>>
>> gfc_expr already has a few bit fields.  I'll suggest adding
>> 'mold' there.
>
> Alright, I guess I'll try this and cook up a new patch.


here goes the new version of the patch, regtested as always. Ok for trunk?

Cheers,
Janus



2010-06-14  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/43388
	* gfortran.h (gfc_expr): Add new member 'mold'.
	* match.c (gfc_match_allocate): Implement the MOLD tag.
	* resolve.c (resolve_allocate_expr): Ditto.
	* trans-stmt.c (gfc_trans_allocate): Ditto.


2010-06-14  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/43388
	* gfortran.dg/allocate_alloc_opt_8.f90: New.
	* gfortran.dg/allocate_alloc_opt_9.f90: New.
	* gfortran.dg/allocate_alloc_opt_10.f90: New.
	* gfortran.dg/class_allocate_2.f03: Modified an error message.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr43388_v2.diff
Type: application/octet-stream
Size: 8677 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100615/56a5634f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allocate_alloc_opt_8.f90
Type: application/octet-stream
Size: 262 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100615/56a5634f/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allocate_alloc_opt_9.f90
Type: application/octet-stream
Size: 508 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100615/56a5634f/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allocate_alloc_opt_10.f90
Type: application/octet-stream
Size: 627 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100615/56a5634f/attachment-0003.obj>


More information about the Fortran mailing list