This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36803] New: Should reject: INTENT(OUT) formal + nondefinable actual 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: 11 Jul 2008 06:11:57 -0000
- Subject: [Bug fortran/36803] New: Should reject: INTENT(OUT) formal + nondefinable actual argument
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following is invalid as "(n)" is not definable and thus shall not be passed
to an INTENT(OUT) variable. For scalars or for other types than CHARACTER, one
gets the expected
Error: Actual argument at (1) must be definable as the dummy argument 'x'
is INTENT = OUT/INOUT
The problem might have the same cause as PR 36795.
interface
subroutine foo(x)
character, intent(out) :: x(:) ! or INTENT(INOUT)
end subroutine foo
end interface
character :: n(5)
call foo( (n) )
end
--
Summary: Should reject: INTENT(OUT) formal + nondefinable actual
argument
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36803