This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32095] Accepts invalid character(len(a)),dimension(1) :: a
- From: "domob at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jul 2008 10:31:23 -0000
- Subject: [Bug fortran/32095] Accepts invalid character(len(a)),dimension(1) :: a
- References: <bug-32095-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from domob at gcc dot gnu dot org 2008-07-31 10:31 -------
So the following two lines should give this error, right:
subroutine test (a)
character(len(a)) :: a
end subroutine test
subroutine test2 (n, arr)
integer :: arr(n), n
end subroutine test2
where in test2, reversing the order of the definition of arr(n) and n should
make it work again. Did I understand this correctly?
In this case, wouldn't it be enough to check that each symbol used in a
specification expression already has a type != BT_UNKNOWN to ensure it already
was specified?
What's about that one, where i has an implicit type of INTEGER (if I'm not
mistaken):
subroutine test2 (i, arr)
integer :: arr(i)
end subroutine test2
Is that one allowed or is here an explicit specification of i needed, too?
--
domob at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |domob at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32095