Files
codeql/cpp/ql/test/library-tests/pointsto/more/aggregate_init.c
2018-08-02 17:53:23 +01:00

16 lines
205 B
C

// pointsto on aggregates
typedef struct
{
int *ptr;
} myStruct1;
int *myFunction1()
{
int x, y;
myStruct1 a = { .ptr = &x };
myStruct1 b = { .ptr = &y };
return a.ptr; // &x [FALSE POSITIVE: y]
}