[Patch, fortran] PR29642 - Fortran 2003: VALUE Attribute (pass by value)

Paul Thomas paulthomas2@wanadoo.fr
Thu Nov 23 17:41:00 GMT 2006


Tobias,
>>> Standard is two spaces between date and name and between name and email
>>> address.
Done - I put my glasses on this time.
>
> You should add a test whether the VALUE variable is also a dummy
> variable; currently,e.g.
Done in resolve_symbol.
> program test
> real, value :: a
> end program test
> gives no error.
value_3.f90 is suitably updated.
>
> case FL_PROGRAM:
> case FL_BLOCK_DATA:
> case FL_MODULE:
> case FL_LABEL:
> (not found in the standard, but should be obvious; for VALUE probably
> not needed if one requires "dummy".)
I took that point of view - I would need, in all conscience, to think 
about VOLATILE in these cases and to test what happens if the conflict 
is not flagged.
>
>
> VALUE should conflict with PARAMETER, EXTERNAL
> See:
Done and tested; for some reason, I could not get EXTERNAL to do 
anything before :-)
>
>
> Maybe better: "-std=f2003 -fall-intrinsics"
Done.
>
>
> Please add a test like:
> program x
> real,value :: r
> end program x
>
Done.
>
> value_4.f90
> + if ((2.0 * a).ne.b) call abort ()
> This fails here. You should use something like:
> if(abs(2.0*a -b)>epsilon(a)) call abort()
Done - I used a generic function delta for real, integer and complex.

Regtested on Cygwin_NT/amd64

OK for trunk?

Thanks

Paul

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Change.Logs
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061123/c5eebdea/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: value.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061123/c5eebdea/attachment-0001.ksh>


More information about the Gcc-patches mailing list