[Bug fortran/32323] Accepts invalid vector subscript actual argument for intent(out) dummy argument
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Jun 13 18:04:00 GMT 2007
------- Comment #1 from burnus at gcc dot gnu dot org 2007-06-13 18:03 -------
Thanks for finding this bug! I think it is the following in the Fortran 2003
standard:
"12.4.1.2 Actual arguments associated with dummy data objects"
"If a nonpointer dummy argument has INTENT (OUT) or INTENT (INOUT), the actual
argument shall be definable."
"If the actual argument is an array section having a vector subscript, the
dummy argument is not definable and shall not have the INTENT (OUT), INTENT
(INOUT), VOLATILE, or ASYNCHRONOUS attributes."
Thus we also also need to check for VOLATILE instead of
INTENT(IN)/INTENT(INOUT).
Note that array sections without vector subscripts such as
call aa(w(3:1))
are allowed!
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC host triplet|x86_64-unknown-linux-gnu |
Keywords| |accepts-invalid
Last reconfirmed|0000-00-00 00:00:00 |2007-06-13 18:03:56
date| |
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32323
More information about the Gcc-bugs
mailing list