with Interfaces; use Interfaces;
package A is
   Var : unsigned_8;
   for Var'Address use ...
   pragma Volatile (Var);
end A;

with Interfaces; use Interfaces;
with A;
procedure B is
   renamed : Unsigned_8 renames A.Var;
begin
   renamed := renamed or 16#01#;  --  'renamed' is kept in a register
   A.Var   := A.Var or 16#01#;    --  'A.Var' correctly sets the port bit
end B;


-- 
           Summary: renamed volatile variables are not treated as volatile
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rolf dot ebert dot gcc at gmx dot de
  GCC host triplet: any
GCC target triplet: avr


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

Reply via email to