This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: [fortran, patch] Fix conflict detesction for VOLATILE attribute (PR30520)


On Fri, Jan 26, 2007 at 08:15:57PM +0100, FX Coudert wrote:
> > The current patch was a compromise that uses some reasonable  
> > guesses to allow the most common sorts of multiple declarations of  
> > VOLATILE, while rejecting what I would guess to be the most common  
> > forms of incorrect code.  The TODO comment documents where those  
> > guesses fall short.  I think it's a reasonable patch to put into  
> > place while waiting for a complete solution.
> 
> The question is: with this patch, are we rejecting legal code? If  
> it's only an accepts-invalid-code issue, then we can go for doing it  
> that way right now and filing a PR. Otherwise, I don't think it's OK.

We are; with host association, it's legal to do a VOLATILE::var
statement for a host-associated variable var that already has the
VOLATILE attribute, and this patch (at least in the form that had that
variant of the TODO comment) rejects that -- or, more accurately, does
not change the fact that we currently erroneously reject that.

I think that adjusting things to allow that code as well would be
relatively trivial, but will allow more invalid code as well (possibly
including a construct like "REAL, VOLATILE::var; VOLATILE var"; I
don't remember the exact details).

- Brooks


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