allow empty bit-vector if
This commit is contained in:
parent
3069c771cb
commit
13bfdb30d9
|
@ -0,0 +1,16 @@
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
struct empty
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
struct empty e1, e2, e3;
|
||||||
|
_Bool b, c=b;
|
||||||
|
e1=e2;
|
||||||
|
if(b)
|
||||||
|
e3=e2;
|
||||||
|
|
||||||
|
assert(b==c);
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
CORE
|
||||||
|
main.c
|
||||||
|
|
||||||
|
^EXIT=0$
|
||||||
|
^SIGNAL=0$
|
||||||
|
^VERIFICATION SUCCESSFUL$
|
||||||
|
--
|
||||||
|
^warning: ignoring
|
|
@ -25,7 +25,7 @@ bvt boolbvt::convert_if(const if_exprt &expr)
|
||||||
std::size_t width=boolbv_width(expr.type());
|
std::size_t width=boolbv_width(expr.type());
|
||||||
|
|
||||||
if(width==0)
|
if(width==0)
|
||||||
return conversion_failed(expr);
|
return bvt(); // An empty bit-vector if.
|
||||||
|
|
||||||
literalt cond=convert(expr.cond());
|
literalt cond=convert(expr.cond());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue