1--  { dg-do compile }
2
3procedure Loopvar (S : String) is
4   J : Integer := S'First;
5begin
6   while J < S'Last loop
7      pragma Loop_Variant (J);               -- { dg-error "expect name \"Increases\"" }
8      pragma Loop_Variant (Increasing => J); -- { dg-error "expect name \"Increases\"" }
9      pragma Loop_Variant (J + 1);           -- { dg-error "expect name \"Increases\"" }
10      pragma Loop_Variant (incr => -J + 1);  -- { dg-error "expect name \"Increases\"" }
11      pragma Loop_Variant (decr => -J + 1);  -- { dg-error "expect name \"Decreases\"" }
12      pragma Loop_Variant (foof => -J + 1);  -- { dg-error "expect name \"Increases\" or \"Decreases\"" }
13      J := J + 2;
14   end loop;
15end Loopvar;
16