Changes in r3907 fixed basic big-endian byte extract
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@4312 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
This commit is contained in:
parent
103cc5f0cc
commit
cf6bc3f623
|
@ -0,0 +1,22 @@
|
|||
#include <assert.h>
|
||||
|
||||
struct S
|
||||
{
|
||||
short a;
|
||||
short b;
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
if(sizeof(short)!=2 ||
|
||||
sizeof(int)!=4 ||
|
||||
sizeof(struct S)!=4)
|
||||
return 0;
|
||||
|
||||
struct S s;
|
||||
s.a=0x0201;
|
||||
s.b=0x0403;
|
||||
assert(*(int*)&s==0x02010403);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
CORE
|
||||
main.c
|
||||
--big-endian --no-simplify
|
||||
^EXIT=0$
|
||||
^SIGNAL=0$
|
||||
^VERIFICATION SUCCESSFUL$
|
||||
--
|
||||
^warning: ignoring
|
Loading…
Reference in New Issue