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:
kroening 2014-07-16 07:59:52 +00:00
parent 103cc5f0cc
commit cf6bc3f623
2 changed files with 30 additions and 0 deletions

View File

@ -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;
}

View File

@ -0,0 +1,8 @@
CORE
main.c
--big-endian --no-simplify
^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
--
^warning: ignoring