diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 16:50:11 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:36:01 +0200 |
commit | 9669423b703fc50f7acbf9f640743669cf893bcc (patch) | |
tree | de2a17c1cabd333ea3d1395a93e7293fb83fba1e /tests/core | |
parent | 66db5a1d3ed9055ff58a2d249c18b55f7fd677df (diff) |
Use do_run_from_file() for test_phiundef
Diffstat (limited to 'tests/core')
-rw-r--r-- | tests/core/test_phiundef.in | 33 | ||||
-rw-r--r-- | tests/core/test_phiundef.out | 5 |
2 files changed, 38 insertions, 0 deletions
diff --git a/tests/core/test_phiundef.in b/tests/core/test_phiundef.in new file mode 100644 index 00000000..cf4b0f18 --- /dev/null +++ b/tests/core/test_phiundef.in @@ -0,0 +1,33 @@ + +#include <stdlib.h> +#include <stdio.h> + +static int state; + +struct my_struct { +union { + struct { + unsigned char a; + unsigned char b; + } c; + unsigned int d; +} e; +unsigned int f; +}; + +int main(int argc, char **argv) { + struct my_struct r; + + state = 0; + + for (int i=0;i<argc+10;i++) + { + if (state % 2 == 0) + r.e.c.a = 3; + else + printf("%d\n", r.e.c.a); + state++; + } + return 0; +} +
\ No newline at end of file diff --git a/tests/core/test_phiundef.out b/tests/core/test_phiundef.out new file mode 100644 index 00000000..3b04a039 --- /dev/null +++ b/tests/core/test_phiundef.out @@ -0,0 +1,5 @@ +3 +3 +3 +3 +3 |