[Patch, Fortran, F03] PR 40996: Allocatable Scalars

Janus Weil janus@gcc.gnu.org
Mon Aug 31 18:20:00 GMT 2009


>> The patch looks ok to me.  Paul or tobias may have a comment,
>> so you may want to give them a day or two to respond.
>>
>> Here's a few rather minor comments.  In that the comments are
>> minor, feel free to ignore them.
>
> Thanks, Steve and Daniel, for your comments. I have incorporated all
> of them (updated patch attached), in particular:
>
> * I made gfc_type_compatible bool, and used Daniel's gfc_get_super_type inside.
> * I renamed match_intrinsic_typespec to match_type_spec, and
> gfc_match_type_spec to gfc_match_decl_type_spec, and adjusted the
> documentation.

I made another small addition to the patch, which I forgot in my CLASS
parsing/resolution patch: Rejecting CLASS statements with -std=f95.
The attached version of the patch (this time complete with ChangeLog
and test cases) regtests fine. Will commit soon ...

Cheers,
Janus


2009-08-31  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/40940
	* array.c (gfc_match_array_constructor): Rename gfc_match_type_spec.
	* decl.c (gfc_match_type_spec): Rename to gfc_match_decl_type_spec,
	and reject CLASS with -std=f95.
	(gfc_match_implicit, gfc_match_data_decl,gfc_match_prefix,
	match_procedure_interface): Rename gfc_match_type_spec.
	* gfortran.h (gfc_type_compatible): Add prototype.
	* match.h (gfc_match_type_spec): Rename to gfc_match_decl_type_spec.
	* match.c (match_intrinsic_typespec): Rename to match_type_spec, and
	add handling of derived types.
	(gfc_match_allocate): Rename match_intrinsic_typespec and check
	type compatibility of derived types.
	* symbol.c (gfc_type_compatible): New function to check if two types
	are compatible.

2009-08-31  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/40940
	* gfortran.dg/allocate_derived_1.f90: New.
	* gfortran.dg/class_3.f03: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: match_allocate.diff
Type: text/x-diff
Size: 8525 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090831/21ef3f01/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allocate_derived_1.f90
Type: application/octet-stream
Size: 1166 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090831/21ef3f01/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: class_3.f03
Type: application/octet-stream
Size: 240 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090831/21ef3f01/attachment-0001.obj>


More information about the Gcc-patches mailing list