File tree Expand file tree Collapse file tree
cpp/ql/test/library-tests/dataflow/certain Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,4 +61,22 @@ void test3(bool b) { // $ certain="SSA def(&b)" certain="SSA def(b)"
6161 }
6262 use (i); // $ certain="SSA phi(i)"
6363 }
64+ }
65+
66+ void test (int x, bool b1, bool b2) { // $ certain="SSA def(&x)" certain="SSA def(x)" certain="SSA def(&b1)" certain="SSA def(b1)" certain="SSA def(&b2)" certain="SSA def(b2)"
67+ int * p = &x; // $ certain="SSA def(&p)" certain="SSA def(p)" certain="SSA def(*p)"
68+ int i = 0 ; // $ certain="SSA def(&i)" certain="SSA def(i)"
69+ int j = 0 ; // $ certain="SSA def(&j)" certain="SSA def(j)"
70+ while (i < 10 ) { // $ certain="SSA phi(i)" uncertain="SSA phi(*p)"
71+ if (b1) {
72+ *p = 0 ; // $ certain="SSA def(*p)"
73+ }
74+ ++i; // $ certain="SSA def(i)" uncertain="SSA phi(*p)"
75+ }
76+ while (j < 10 ) { // $ uncertain="SSA phi(*p)" certain="SSA phi(j)"
77+ if (b2) {
78+ *(p + j) = 0 ; // $ uncertain="SSA def(*p)"
79+ }
80+ ++j; // $ certain="SSA def(j)" uncertain="SSA phi(*p)"
81+ }
6482}
You can’t perform that action at this time.
0 commit comments