diff options
Diffstat (limited to 'validation/eval')
| -rw-r--r-- | validation/eval/addressable-complex.c | 23 | ||||
| -rw-r--r-- | validation/eval/addressable-degen.c | 17 |
2 files changed, 40 insertions, 0 deletions
diff --git a/validation/eval/addressable-complex.c b/validation/eval/addressable-complex.c new file mode 100644 index 00000000..e3d4aca4 --- /dev/null +++ b/validation/eval/addressable-complex.c @@ -0,0 +1,23 @@ +extern void def(void *); + +struct s1 { + int a; +}; + +int use1(void) +{ + struct s1 s = { 3 }; + + def(&s.a); + + return s.a; +} + +/* + * check-name: eval/addressable-complex + * check-command: test-linearize -Wno-decl -fdump-ir $file + * + * check-output-ignore + * check-output-contains: load\\. + * check-output-excludes: return\\..*\\$3 + */ diff --git a/validation/eval/addressable-degen.c b/validation/eval/addressable-degen.c new file mode 100644 index 00000000..d420927e --- /dev/null +++ b/validation/eval/addressable-degen.c @@ -0,0 +1,17 @@ +extern void def(void *, unsigned int); + +static int bar(void) +{ + int x[2] = { 1, 2 }; + + def(x, sizeof(x)); + return x[1]; +} + +/* + * check-name: eval/addressable-degen + * check-command: test-linearize -fdump-ir $file + * + * check-output-ignore + * check-output-contains: load\\. + */ |
