1--  { dg-do run }
2
3with GNAT.Regpat; use GNAT.Regpat;
4procedure regpat1 is
5begin
6   declare
7      Re : Pattern_Matcher := Compile ("a[]b");
8   begin
9      raise Program_Error;
10   end;
11exception
12   when Expression_Error => null;
13end regpat1;
14