diff --git a/test/constant_time/intraprocedural/struct/tainted_struct_bis.c b/test/constant_time/intraprocedural/struct/tainted_struct_bis.c new file mode 100644 index 0000000000000000000000000000000000000000..1129b2b36c9f630111b8a8cc502569c8139fce52 --- /dev/null +++ b/test/constant_time/intraprocedural/struct/tainted_struct_bis.c @@ -0,0 +1,18 @@ +struct foo { + int x; + int z; +}; + +int main(void) { + int res = 0; + int y = 42; + struct foo __attribute__((__taint__)) bar = { y , 50 }; + + if (bar.x) // Should be detected + res = 42; + + if (bar.z) // Should be detected + res = 60; + + return res; +}