[Bug fortran/30522] New: Host-/use-associated VOLATILE variable: volatile scope, redundent attributes
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Jan 21 01:18:00 GMT 2007
(This bug description assumes that the patch to PR30520 is already applied.)
gfortran currently permits the following redundant VOLATILE attributes:
module A
real :: vol
end module A
module B
use A
volatile :: vol
volatile :: vol ! WRONG, but accepted
end module B
gfortran wrongly rejects the following VOLATILE:
module test
real, volatile :: A
contains
subroutine sub
volatile :: A ! VALID, but rejected
end subroutine sub
end module test
Check: In the following example, the variable "global" should only be volatile
in subroutine A. Does this really happen?
program test
real :: global
! global should not be volatile here
contains
subroutine A
volatile :: global
end subroutine A
subroutine B
! global should not be volatile here
end subroutine B
end program test
--
Summary: Host-/use-associated VOLATILE variable: volatile scope,
redundent attributes
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: rejects-valid, accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
BugsThisDependsOn: 30520
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30522
More information about the Gcc-bugs
mailing list