We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d05a097 + 967afbb commit 7f54be3Copy full SHA for 7f54be3
regression/cbmc/union-unequal-element-size1/main.c
@@ -0,0 +1,24 @@
1
+#include <assert.h>
2
+
3
+union UNIONNAME
4
+{
5
+ int x1;
6
+ char x3[3];
7
+};
8
9
+int main()
10
11
+ union UNIONNAME u;
12
+ u.x1 = 0x01010101;
13
14
+ assert(u.x3[0]);
15
+ assert(u.x3[1]);
16
+ assert(u.x3[2]);
17
18
+ assert(*((char *)&u.x1));
19
+ assert(*(((char *)&u.x1) + 1));
20
+ assert(*(((char *)&u.x1) + 2));
21
+ char s = *(((char *)&u.x1) + 3);
22
+ assert(s);
23
+ return 0;
24
+}
regression/cbmc/union-unequal-element-size1/test.desc
@@ -0,0 +1,10 @@
+KNOWNBUG
+main.c
+--verbosity 10
+^EXIT=0$
+^SIGNAL=0$
+^VERIFICATION SUCCESSFUL$
+--
+^warning: ignoring
+assert(s) fails with field sensitivity, but passes without
0 commit comments