aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/spipaterr.adb
blob: b68dc2e10fac477c3c274f1505df647975975fb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- { dg-do run }

with Text_IO; use Text_IO;
with GNAT.SPITBOL.Patterns; use GNAT.SPITBOL.Patterns;
procedure Spipaterr is
    X : String := "ABCDE";
    Y : Pattern := Len (1) & X (2 .. 2);
begin
    if Match ("XB", Y) then
       null;
    else
       raise Program_Error;
    end if;
end;