This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34231] Scalar actual not distinguished from assumed size formal 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: 26 Nov 2007 13:58:02 -0000
- Subject: [Bug fortran/34231] Scalar actual not distinguished from assumed size formal argument
- References: <bug-34231-15407@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 2007-11-26 13:58 -------
> I think that the required F2003 survives correctly but
> I am having difficulty to find in the ChangeLog where this was added.
It was added for PR 30940.
> Tobias, what do you think?
Looks OK. At least the following works as expected and prints:
two: character(*) scalar ! finds right generic interface
one: character(*), dimension(*) ! F2003 storage equivalence: ok for specific
! function.
two: character(*) scalar ! obviously ok.
And if one comments out "two" in "interface gen", one gets the expected
compile-time error.
MODULE test
implicit none
INTERFACE gen
MODULE PROCEDURE one,two
END INTERFACE
CONTAINS
SUBROUTINE one(cnames)
CHARACTER(*) :: cnames(*)
write(*,*) 'one: character(*), dimension(*)'
END SUBROUTINE one
SUBROUTINE two(cname)
CHARACTER(*) :: cname
write(*,*) 'two: character(*) scalar'
END SUBROUTINE two
END MODULE
PROGRAM main
USE test
CHARACTER(11) :: cname = 'Hello World'
CALL gen(cname)
CALL one(cname)
CALL two(cname)
END PROGRAM
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34231