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]

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


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.

Attachment: pr43388_v2.diff
Description: Binary data

Attachment: allocate_alloc_opt_8.f90
Description: Binary data

Attachment: allocate_alloc_opt_9.f90
Description: Binary data

Attachment: allocate_alloc_opt_10.f90
Description: Binary data


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