public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/37602]  New: Renaming of volatile causes variable access
@ 2008-09-20 19:57 sam at gcc dot gnu dot org
  2009-10-02 21:36 ` [Bug ada/37602] " sam at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: sam at gcc dot gnu dot org @ 2008-09-20 19:57 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug ada/37602] Renaming of volatile causes variable access
  2008-09-20 19:57 [Bug ada/37602] New: Renaming of volatile causes variable access sam at gcc dot gnu dot org
@ 2009-10-02 21:36 ` sam at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: sam at gcc dot gnu dot org @ 2009-10-02 21:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from sam at gcc dot gnu dot org  2009-10-02 21:36 -------
Still present in GCC trunk (4.5.0 20090930)


-- 

sam at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-10-02 21:36:12
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37602


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-02 21:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-20 19:57 [Bug ada/37602] New: Renaming of volatile causes variable access sam at gcc dot gnu dot org
2009-10-02 21:36 ` [Bug ada/37602] " sam at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).