[Patch, Fortran] PR 34760 - Handle flavor = unknown better to not wrongly make a variable as FL_PROCEDURE
Jerry DeLisle
jvdelisle@verizon.net
Sat Jan 19 18:41:00 GMT 2008
Tobias Burnus wrote:
> In the old days (i.e. before July last year), the following was rejected
> (PR 32760)
>
> module gfcbug68
> public :: print
> contains
> ! call somewhere "print *,"
> subroutine print
>
> as the "print" was matched as variable (with FL_UNKNOWN) and assigned
> FL_VARIABLE. The solution was not to set the flavor for PUBLIC/PRIVATE.
> This, however, caused a problem with PR34760 since it rejects:
>
> module m
> integer, private :: istat
> ...
> allocate(array(5), stat=istat)
>
> as "istat" is FL_UNKNOWN and thus not a variable.
>
> The attached patch tried to handle this; I am not positive that I forgot
> a construct, but it should work for a lot of constructs and especially
> it works with the one above.
>
> As PR 34871 shows, there is still an accepts-invalid problem, which does
> not seem to be neither a regression nor related to this patch.
>
> Build and regression tested on x86-64-linux. OK for the trunk?
>
> Tobias
>
This is OK,
Jerry
More information about the Gcc-patches
mailing list