2015-09-24 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gnat.dg / conv_bug.adb
blobf5aaef363e5003e18b82b385f85b0d03c3f89dc0
1 -- { dg-do run }
2 -- { dg-options "-gnatws" }
4 with discr3; use discr3;
5 with Text_IO; use Text_IO;
6 procedure Conv_Bug is
7 begin
8 begin
9 V2 := S2 (V1);
10 exception
11 when Constraint_Error => null;
12 when others => Put_Line ("Wrong Exception raised");
13 end;
15 begin
16 V2 := S2(V1(V1'Range));
17 Put_Line ("No exception raised - 2");
18 exception
19 when Constraint_Error => null;
20 when others => Put_Line ("Wrong Exception raised");
21 end;
23 begin
24 V2 := S2 (V3);
25 Put_Line ("No exception raised - 3");
26 exception
27 when Constraint_Error => null;
28 when others => Put_Line ("Wrong Exception raised");
29 end;
30 end Conv_Bug;