Skip to content

Commit b3f92fc

Browse files
committed
C++: Add FN caused by missing static local initialization in SSA.
1 parent 0469df1 commit b3f92fc

File tree

1 file changed

+13
-0
lines changed
  • cpp/ql/test/library-tests/dataflow/dataflow-tests

1 file changed

+13
-0
lines changed

cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,3 +615,16 @@ void test_flow_through_void_double_pointer(int *p) // $ ast-def=p
615615
void* q = (void*)&p;
616616
sink(**(int**)q); // $ ir MISSING: ast
617617
}
618+
619+
void use(int *);
620+
621+
void test_def_via_phi_read(bool b)
622+
{
623+
static int buffer[10]; // This is missing an initialisation in IR dataflow
624+
if (b)
625+
{
626+
use(buffer);
627+
}
628+
intPointerSource(buffer);
629+
sink(buffer); // $ ast MISSING: ir
630+
}

0 commit comments

Comments
 (0)