Skip to content

Commit

Permalink
Merge pull request #8213 from tautschnig/cleanup/no-64bit
Browse files Browse the repository at this point in the history
Avoid 64-bit platform support requirement for running tests
  • Loading branch information
tautschnig authored Feb 21, 2024
2 parents 4cb0a63 + ef62b03 commit 47a62f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#include <assert.h>
#include <stdlib.h>

#ifdef _MSC_VER
# define _Static_assert(x, m) static_assert(x, m)
#endif

struct list;

typedef struct list list_nodet;
Expand All @@ -22,11 +15,11 @@ int max_depth = 2;
list_nodet *build_node(int depth)
{
if(max_depth < depth)
return ((list_nodet *)NULL);
return ((list_nodet *)0);
else
{
_Static_assert(sizeof(list_nodet) == 16, "");
list_nodet *result = malloc(16);
__CPROVER_assert(sizeof(list_nodet) == 16, "struct size is 16 bytes");
list_nodet *result = __CPROVER_allocate(16, 0);

if(result)
{
Expand All @@ -53,6 +46,6 @@ int main()
{
i = i + 1;
}
assert(i == 3);
__CPROVER_assert(i == 3, "i should be 3");
return 0;
}
2 changes: 1 addition & 1 deletion regression/cbmc/Pointer_byte_extract8/test.desc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CORE
main.c
main.i
--no-malloc-may-fail --64 --unwind 4 --unwinding-assertions
^EXIT=0$
^SIGNAL=0$
Expand Down

0 comments on commit 47a62f6

Please sign in to comment.