X-Git-Url: https://git.wh0rd.org/?p=ICEs.git;a=blobdiff_plain;f=290097%2Ftest.i.0;fp=290097%2Ftest.i.0;h=d490ce60af7ad09ef0c3b8a6ce8544153d2b993b;hp=0000000000000000000000000000000000000000;hb=81f80d8c1c9898ae1c26534a3287a47220390f5c;hpb=45516216fc552c838e650d868214d867027a64f6 diff --git a/290097/test.i.0 b/290097/test.i.0 new file mode 100644 index 0000000..d490ce6 --- /dev/null +++ b/290097/test.i.0 @@ -0,0 +1,20 @@ +typedef unsigned char u8; +typedef unsigned short u16; + +struct s { + u8 anchor[5]; + u16 table_length; +}; + +void some_function(int x); + +void other_function(const struct s *pointer) +{ + u8 checksum = 0; + const u8 *ptr = (const u8 *)(pointer); + + for (unsigned int i = 0; i < sizeof(*pointer); ++i) + checksum = (checksum + ptr[i]) & 0xFF; + + some_function((int)checksum); +}