diff options
author | Nadesh Ramanathan <nadeshramanathan88@gmail.com> | 2020-06-13 12:51:40 +0100 |
---|---|---|
committer | Nadesh Ramanathan <nadeshramanathan88@gmail.com> | 2020-06-13 12:51:40 +0100 |
commit | 71b6f483093599088c48d166dbe496b64462bd4b (patch) | |
tree | 1a700d9d0e3904fb3115ff124b3bb9b9045a1900 | |
parent | 9ee43ea5cd1b637a27743a451f697001f07bf47a (diff) | |
download | vericert-kvx-71b6f483093599088c48d166dbe496b64462bd4b.tar.gz vericert-kvx-71b6f483093599088c48d166dbe496b64462bd4b.zip |
summing on volatile variable
-rw-r--r-- | test/array-volatile.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/array-volatile.c b/test/array-volatile.c new file mode 100644 index 0000000..f12b79a --- /dev/null +++ b/test/array-volatile.c @@ -0,0 +1,7 @@ +int main() { + int x[2] = {5, 10}; + volatile int sum; + for(int j=0; j <2; j++) + sum += x[j]; + return sum; +} |