This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34665] Cannot pass scalar to array argument 'a'
- 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: 4 Jan 2008 19:28:43 -0000
- Subject: [Bug fortran/34665] Cannot pass scalar to array argument 'a'
- References: <bug-34665-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from burnus at gcc dot gnu dot org 2008-01-04 19:28 -------
> We catch this with an explicit interface, but we
> should still check for occurrence in the
> same source code.
I do not understand this part. There is an explicit interface available as both
are contained in the same main program.
>From Fortran 2003's "12.4.1.2 Actual arguments associated with dummy data
objects":
"If the actual argument is scalar, the corresponding dummy argument shall be
scalar unless the actual argument is of type default character, of type
character with the C character kind (15.1), or is an element or substring of an
element of an array that is not an assumed-shape or pointer array."
I think this has to be fixed in interface.c's compare_parameter.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34665