1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
-- { dg-do run } -- { dg-options "-O2" } with Enum1_Pkg; use Enum1_Pkg; procedure Enum1 is function Cond return Boolean is begin return My_N = Two or My_N = Three; end; begin if Cond then raise Constraint_Error; end if; end;