source: CIVL/examples/mem/writeset/ws_push_seq-unsupported.cvl@ cc8e265

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since cc8e265 was a48ef83, checked in by Ziqing Luo <ziqing@…>, 6 years ago

Fixed the bug that two ValueSetTemplates associated with a same
variable had incompatible types: one has complete array type while the
other has incomplete array type.

Previously, a write-footprint was always saved before the state being
changed by the write operation. The fix swaps the order of them.
This rules out the last case where a write-footprint is on an
uninitialized variable of an aggregate type.

Besides, to force ValueSetTemplates to be free of incomplete array
types (except for the heap type), I imposed a (maybe temporary)
restriction on the use of "capture" of read/write-footprints:

No variable involving sequence type sub-objects shall be captured!

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5372 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 317 bytes
Line 
1#include <mem.cvh>
2
3int main() {
4 struct {
5 int a;
6 union UT {
7 int b_seq[];
8 int b_arr[10];
9 } b;
10 } s;
11
12 $write_set_push();
13
14 s.a = 0; // currently CIVL does not support capturing read/write
15 // footprints on variables whose types containing sequences
16
17 $mem m1 = $write_set_pop();
18}
Note: See TracBrowser for help on using the repository browser.