diff options
Diffstat (limited to 'validation/backend/load-global.c')
| -rw-r--r-- | validation/backend/load-global.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/validation/backend/load-global.c b/validation/backend/load-global.c new file mode 100644 index 00000000..dedb35f3 --- /dev/null +++ b/validation/backend/load-global.c @@ -0,0 +1,21 @@ +const char *s = "abc"; +int x = 4; +int y; + +int *p = &x; +int *q; + +int loadn(void) { return y; } +int loadi(void) { return x; } + +const char *loads(void) { return s; } + +int *retpn(void) { return q; } +int loadpn(void) { return *q; } +int *retpi(void) { return p; } +int loadpi(void) { return *p; } + +/* + * check-name: use simple value from global vars + * check-command: ./sparsec -Wno-decl -c $file -o tmp.o + */ |
