diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-02-16 05:56:53 +0100 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2017-02-16 20:43:01 +0800 |
| commit | f3e9e7da079b09432a7e087757265fed305ad2ba (patch) | |
| tree | e455b194f47a7ea1d1705841934be0f340e46a84 /validation | |
| parent | c365ba654b1b733dc2aaa3fc6b54078ae4ef7dbb (diff) | |
| download | sparse-dev-f3e9e7da079b09432a7e087757265fed305ad2ba.tar.gz | |
add killing of OP_SLICEs
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/kill-slice.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/validation/kill-slice.c b/validation/kill-slice.c new file mode 100644 index 00000000..00db0e0f --- /dev/null +++ b/validation/kill-slice.c @@ -0,0 +1,19 @@ +struct bar { + int x; + int y[2]; +}; +struct bar bar(void); + +int foo(void) +{ + int x = bar().x; + return x & 0; +} + +/* + * check-name: kill-slice + * check-command: test-linearize -Wno-decl $file + * check-output-ignore + * + * check-output-excludes: slice\\. + */ |
