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 44962: [OOP] ICE with specification expression SIZE(<CLASS>)


2010/7/26 Tobias Burnus <burnus@net-b.de>:
> Janus Weil wrote:
>>> Can you add a comment before the gfc_is_constant_expr to state what the
>>> function is actually doing (e.g. checking for specification expressions
>>> while taking additionally the given constraints into account.)
>>>
>> Well, it's actually not checking for specification expressions (which
>> is what gfc_specification_expr does), but it checks for constant
>> expressions, which are defined in chapter 7.1.12 of F08.
>>
>
> No, it does not. A Fortran 2008 constant expression is a Fortran 2003
> initialization expression and for array bounds one does not check for
> F2008 constant/F2003 initialization expressions otherwise automatic
> arrays would not be possible.
>
> Seemingly, the gfortran names are based on Fortran 95 - thus looking at
> F2003/F2008 does not help if one want to know what it meant. I think we
> urgently need to add in the comment a reference to the relevant sections
> (and terms) of all three standards - otherwise, one gets completely
> confused.
>
> That's seems to be complicated by the problem that Fortran 95 seems
> define have four terms while Fortran 2003 and Fortran 2008 define only
> three terms. In particular, F95 has constant and initialization
> expressions, F2003 has initialization expressions, and F2008 has
> constant expressions. I think I will print out the few pages of the
> three standard and try to get an idea how the terms relate in the
> different standards.

Ok, fine. Apparently I have trouble understanding the subtleties of
how different versions of the standard use these terms in different
ways.

I guess what I'll do is just commit the the one hunk which fixes the
original problem (which has been approved already) and leave all the
rest alone.

Cheers,
Janus


2010-07-29  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/44962
	* resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.


2010-07-29  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/44962
	* gfortran.dg/typebound_proc_17.f03: New.

Attachment: pr44962_v5.diff
Description: Binary data

Attachment: typebound_proc_17.f03
Description: Binary data


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