summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/uninit_func.adb
blob: ff5427ad7c9794a7d0797ea46839586ba8bfdd3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- { dg-do compile }
-- { dg-options "-O -Wall" }

function uninit_func (A, B : Boolean) return Boolean is
   C : Boolean;
begin
   if A then
      C := False;
   elsif B then
      C := True;
   end if;
   return C; -- { dg-warning "may be used uninitialized" }
end;