[Bug ada/37602] New: Renaming of volatile causes variable access
sam at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Sep 20 19:57:00 GMT 2008
The following procedure generates an access to A because of its renaming as B,
even though no explicit access is made to A or B. I think this violates the
second sentence of C.6(20).
with Interfaces; use Interfaces;
with System.Storage_Elements; use System.Storage_Elements;
procedure T is
A : Unsigned_8;
for A'Address use To_Address (1000);
pragma Volatile (A);
B : Unsigned_8 renames A;
begin
null;
end T;
The generated assembler code (-O3 -fomit-frame-pointer) for this procedure is:
_ada_t:
subl $12, %esp
movzbl 1000, %eax
addl $12, %esp
ret
--
Summary: Renaming of volatile causes variable access
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sam at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37602
More information about the Gcc-bugs
mailing list