Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gnat.dg / loopvar.adb
blobe98d20d310d9e61ae00235594bf8ebafc14e4721
1 -- { dg-do compile }
3 procedure Loopvar (S : String) is
4 J : Integer := S'First;
5 begin
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\", \"Decreases\", or \"Structural\"" }
13 J := J + 2;
14 end loop;
15 end Loopvar;