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 56266: ICE on invalid in gfc_match_varspec


Le 13/04/2013 16:02, Janus Weil a écrit :
> Hi Mikael,
> 
>> So, it seems that EXPR_FUNCTION is acceptable in gfc_match_varspec.
>> And then, there is nothing preventing 'c(i)' in 'c(i)%encM()' from being
>> parsed as a function.  Is this supported?
> 
> I think this is forbidden by the Fortran standard, cf. e.g.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42188
> 
> Actually I'm not sure in which context a function call with sub-refs
> would be valid. One should re-check the standard on this ...
> 
Indeed, that's invalid:

structure-component is data-ref
data-ref is part-ref [ % part-ref ] ...
part-ref is part-name [ ( section-subscript-list ) ] [ image-selector ]

(R611) The leftmost part-name shall be the name of a data object.


I thought they were allowed for pointer-returning functions.

Mikael


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