type __ghdl_bool_type is boolean {false, true}; type __ghdl_integer is signed (32); public function test_arg (b1 : __ghdl_bool_type; b2 : __ghdl_bool_type; b3 : __ghdl_bool_type) return __ghdl_integer declare local var r : __ghdl_integer; begin r := __ghdl_integer'[0]; if b1 then if b2 then declare local var w : __ghdl_integer; begin w := __ghdl_integer'[1]; r := w; end; else if b3 then declare local var w : __ghdl_integer; begin w := __ghdl_integer'[2]; r := w; end; else end if; end if; else declare local var w : __ghdl_integer; begin w := __ghdl_integer'[3]; r := w; end; end if; return r; end;