Merge pull request #12356 from MathiasVP/use-phi-reads

C++: Include "phi reads" in `DataFlow::Node`
This commit is contained in:
Mathias Vorreiter Pedersen
2023-03-03 11:14:08 +00:00
committed by GitHub
5 changed files with 84 additions and 29 deletions

View File

@@ -615,3 +615,16 @@ void test_flow_through_void_double_pointer(int *p) // $ ast-def=p
void* q = (void*)&p;
sink(**(int**)q); // $ ir MISSING: ast
}
void use(int *);
void test_def_via_phi_read(bool b)
{
static int buffer[10]; // This is missing an initialisation in IR dataflow
if (b)
{
use(buffer);
}
intPointerSource(buffer);
sink(buffer); // $ ast,ir
}