This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/44604] New: Wrong run-time checks with VALUE dummies and pointer/allocatable actuals
- 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: 21 Jun 2010 07:02:34 -0000
- Subject: [Bug fortran/44604] New: Wrong run-time checks with VALUE dummies and pointer/allocatable actuals
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Reported by Michael Briggs at
http://gcc.gnu.org/ml/fortran/2010-06/msg00205.html
Checking fails for a zero-initialized pointers/allocatable scalar
variable/array element passed to a dummy argument with VALUE attribute.
For the following program, it fails for -fcheck=all:
program TestSmall
implicit none
integer, allocatable :: ptrVar
allocate ( ptrVar )
ptrVar = 0 ! if changed to 1, the problem goes away
call test(ptrVar)
contains
subroutine test(n)
integer, VALUE :: n
end subroutine test
end program TestSmall
--
Summary: Wrong run-time checks with VALUE dummies and
pointer/allocatable actuals
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: diagnostic
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=44604