This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32323] Accepts invalid vector subscript actual argument for intent(out) dummy argument
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jun 2007 18:03:56 -0000
- Subject: [Bug fortran/32323] Accepts invalid vector subscript actual argument for intent(out) dummy argument
- References: <bug-32323-14178@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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