PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gnat.dg / others1.adb
blob59393fa00fff478e321ad293f07a8c550c0b898a
1 -- { dg-do compile }
2 -- { dg-options "-gnatwr" }
4 procedure Others1 is
5 type Ar is Array (1..10) of Natural;
6 function five return integer is (5);
7 THing : Ar;
8 begin
9 Thing := (1..5 => 22, 6 ..10 => 111, others => Five); -- { dg-warning "there are no others" }
10 if Thing (1) /= thing (5) then
11 raise Program_Error;
12 end if;
13 end;