This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30522] New: Host-/use-associated VOLATILE variable: volatile scope, redundent attributes
- 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 Jan 2007 01:18:33 -0000
- Subject: [Bug fortran/30522] New: Host-/use-associated VOLATILE variable: volatile scope, redundent attributes
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
(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