diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-04-03 17:07:02 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-11-08 21:41:34 +0100 |
| commit | 35db0f18f8153592ec8ed6ea0fa3650c2d3efded (patch) | |
| tree | 7c7893fdc1c9299f05981cc263c4ae918e504913 /validation/reload-aliasing.c | |
| parent | 095dc58e5cdaf04330c2f75f74aab415d18d562d (diff) | |
| download | sparse-dev-35db0f18f8153592ec8ed6ea0fa3650c2d3efded.tar.gz | |
associate MOD_RESTRICT with restrict-qualified variables
Note: there is still no semantic associated with 'restrict'
but this is a preparatory step.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/reload-aliasing.c')
| -rw-r--r-- | validation/reload-aliasing.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/validation/reload-aliasing.c b/validation/reload-aliasing.c new file mode 100644 index 00000000..3aad317b --- /dev/null +++ b/validation/reload-aliasing.c @@ -0,0 +1,41 @@ +extern int g, h; + +void f00(int *s) +{ + g = *s; + h = *s; +} + +void f01(int *a, int *b, int *s) +{ + *a = *s; + *b = *s; +} + +/* + * check-name: reload-aliasing.c + * check-command: test-linearize -Wno-decl $file + * + * check-output-start +f00: +.L0: + <entry-point> + load.32 %r2 <- 0[%arg1] + store.32 %r2 -> 0[g] + load.32 %r4 <- 0[%arg1] + store.32 %r4 -> 0[h] + ret + + +f01: +.L2: + <entry-point> + load.32 %r6 <- 0[%arg3] + store.32 %r6 -> 0[%arg1] + load.32 %r9 <- 0[%arg3] + store.32 %r9 -> 0[%arg2] + ret + + + * check-output-end + */ |
