/* TAGS: c sym */ /* VERIFY_OPTS: --symbolic --sequential -o nofail:malloc */ /* CC_OPTS: */ // V: v.10 CC_OPT: -DSIZE=10 // V: v.100 CC_OPT: -DSIZE=100 // V: v.1000 CC_OPT: -DSIZE=1000 // V: v.10000 CC_OPT: -DSIZE=10000 TAGS: big // V: v.100000 CC_OPT: -DSIZE=100000 TAGS: big extern void __VERIFIER_error() __attribute__ ((__noreturn__)); extern int __VERIFIER_nondet_int(void); void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: __VERIFIER_error(); } } struct S { int n; }; struct S s[SIZE]; int main() { int i; int c; c = __VERIFIER_nondet_int(); for(i = 0; i < SIZE; i++) { if(c > 5) break; s[i].n = 10; } for(i = 0; i < SIZE; i++) { if(c <= 5) __VERIFIER_assert(s[i].n == 10); } return 0; }