Skip to content

Commit 47a62f6

Browse files
authored
Merge pull request #8213 from tautschnig/cleanup/no-64bit
Avoid 64-bit platform support requirement for running tests
2 parents 4cb0a63 + ef62b03 commit 47a62f6

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

regression/cbmc/Pointer_byte_extract8/main.c renamed to regression/cbmc/Pointer_byte_extract8/main.i

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
#include <assert.h>
2-
#include <stdlib.h>
3-
4-
#ifdef _MSC_VER
5-
# define _Static_assert(x, m) static_assert(x, m)
6-
#endif
7-
81
struct list;
92

103
typedef struct list list_nodet;
@@ -22,11 +15,11 @@ int max_depth = 2;
2215
list_nodet *build_node(int depth)
2316
{
2417
if(max_depth < depth)
25-
return ((list_nodet *)NULL);
18+
return ((list_nodet *)0);
2619
else
2720
{
28-
_Static_assert(sizeof(list_nodet) == 16, "");
29-
list_nodet *result = malloc(16);
21+
__CPROVER_assert(sizeof(list_nodet) == 16, "struct size is 16 bytes");
22+
list_nodet *result = __CPROVER_allocate(16, 0);
3023

3124
if(result)
3225
{
@@ -53,6 +46,6 @@ int main()
5346
{
5447
i = i + 1;
5548
}
56-
assert(i == 3);
49+
__CPROVER_assert(i == 3, "i should be 3");
5750
return 0;
5851
}

regression/cbmc/Pointer_byte_extract8/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CORE
2-
main.c
2+
main.i
33
--no-malloc-may-fail --64 --unwind 4 --unwinding-assertions
44
^EXIT=0$
55
^SIGNAL=0$

0 commit comments

Comments
 (0)