1-- { dg-do compile } 2 3procedure Discr38 is 4 5 type Enum is (OK, 6 NOT_CONNECTED, 7 DISCONNECTED, 8 REQUEST_Q_EMPTY, 9 SERVER_UNAVAILABLE, 10 BUFFER_TOO_SMALL, 11 NO_FREE_SLOT, 12 RAISE_EXCEPTION, 13 REQUEST_CANCELLED, 14 REQUEST_IN_PROGRESS, 15 SERVER_BUSY, 16 BLOCK_ACKNOWLEDGE); 17 18 type R (Status : Enum := OK) is record 19 Status_Block : Integer; 20 case Status is 21 when RAISE_EXCEPTION => 22 I : Integer; 23 when OK => 24 Length : Natural; 25 Data : Integer; 26 when others => 27 null; 28 end case; 29 end record; 30 for R use record 31 Status at 0 range 0 .. 7; 32 Status_Block at 4 range 0 .. 31; 33 Length at 8 range 0 .. 31; 34 end record; 35 36 Nil : constant R := (OK, 1, 0, 1); 37 38begin 39 null; 40end; 41