| 1 |
-- { dg-do run } |
| 2 |
|
| 3 |
with Ada.Text_IO; use Ada.Text_IO; |
| 4 |
|
| 5 |
procedure Wide_Wide_Value1 is |
| 6 |
begin |
| 7 |
begin |
| 8 |
declare |
| 9 |
Str : constant Wide_Wide_String := |
| 10 |
Wide_Wide_Character'Val (16#00000411#) & |
| 11 |
Wide_Wide_Character'Val (16#0000043e#) & |
| 12 |
Wide_Wide_Character'Val (16#00000434#) & |
| 13 |
Wide_Wide_Character'Val (16#00000430#) & |
| 14 |
Wide_Wide_Character'Val (16#00000443#) & |
| 15 |
Wide_Wide_Character'Val (16#00000431#) & |
| 16 |
Wide_Wide_Character'Val (16#00000430#) & |
| 17 |
Wide_Wide_Character'Val (16#00000435#) & |
| 18 |
Wide_Wide_Character'Val (16#00000432#) & |
| 19 |
Wide_Wide_Character'Val (16#00000416#) & |
| 20 |
Wide_Wide_Character'Val (16#00000443#) & |
| 21 |
Wide_Wide_Character'Val (16#0000043c#) & |
| 22 |
Wide_Wide_Character'Val (16#00000430#) & |
| 23 |
Wide_Wide_Character'Val (16#00000442#) & |
| 24 |
Wide_Wide_Character'Val (16#0000041c#) & |
| 25 |
Wide_Wide_Character'Val (16#00000430#) & |
| 26 |
Wide_Wide_Character'Val (16#00000440#) & |
| 27 |
Wide_Wide_Character'Val (16#00000430#) & |
| 28 |
Wide_Wide_Character'Val (16#00000442#) & |
| 29 |
Wide_Wide_Character'Val (16#0000043e#) & |
| 30 |
Wide_Wide_Character'Val (16#00000432#) & |
| 31 |
Wide_Wide_Character'Val (16#00000438#) & |
| 32 |
Wide_Wide_Character'Val (16#00000447#); |
| 33 |
|
| 34 |
Val : constant Integer := Integer'Wide_Wide_Value (Str); |
| 35 |
begin |
| 36 |
Put_Line ("ERROR: 1: Constraint_Error not raised"); |
| 37 |
end; |
| 38 |
exception |
| 39 |
when Constraint_Error => |
| 40 |
null; |
| 41 |
when others => |
| 42 |
Put_Line ("ERROR: 1: unexpected exception"); |
| 43 |
end; |
| 44 |
|
| 45 |
begin |
| 46 |
declare |
| 47 |
Str : Wide_Wide_String (1 .. 128) := |
| 48 |
(others => Wide_Wide_Character'Val (16#0FFFFFFF#)); |
| 49 |
|
| 50 |
Val : constant Integer := Integer'Wide_Wide_Value (Str); |
| 51 |
begin |
| 52 |
Put_Line ("ERROR: 1: Constraint_Error not raised"); |
| 53 |
end; |
| 54 |
exception |
| 55 |
when Constraint_Error => |
| 56 |
null; |
| 57 |
when others => |
| 58 |
Put_Line ("ERROR: 1: unexpected exception"); |
| 59 |
end; |
| 60 |
end Wide_Wide_Value1; |