Package: gnat-12
Followup-For: Bug #643663
Control: reassign 643663 gnat-13 13.2.0-5
Control: retitle 643663 gnat: invalid access to atomic variable

Hello.

With gnat-13, the following sources compile without error.
On the other hand, the invalid access to the atomic variable may not
be fixed.

Do you think we can close this bug?
Upstream seems to think so
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50558)


package Pkg is
   type Byte is mod 2**8;
   type Reserved_24 is mod 2**24;

   type Data_Record is
      record
         Data : Byte;
         Reserved : Reserved_24;
      end record;

   for Data_Record use
      record
         Data at 0 range 0 .. 7;
         Reserved at 0 range 8 .. 31;
      end record;

   for Data_Record'Size use 32;
   for Data_Record'Alignment use 4;

   Data_Register : Data_Record;
   pragma Atomic (Data_Register);
end Pkg;

with Pkg;
procedure Test is
begin
   Pkg.Data_Register := (
      Data => 255,
      others => <>
      -- expected error: no value supplied for component "Reserved"
   );
end Test;

Reply via email to