diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2017-06-16 11:53:28 +0200 |
---|---|---|
committer | Bernhard Schommer <bschommer@users.noreply.github.com> | 2017-07-06 15:41:51 +0200 |
commit | 2ff53c2361773f28027ccc8332e1830686d5bbc6 (patch) | |
tree | 2c0b1dc7201bd3618859cc5dc2257dbf07e996de /test/regression/volatile4.c | |
parent | dff22ef6d855973e0e0f05c7203a6bfa9a4cf01a (diff) | |
download | compcert-2ff53c2361773f28027ccc8332e1830686d5bbc6.tar.gz compcert-2ff53c2361773f28027ccc8332e1830686d5bbc6.zip |
Extend builtin arguments with a pointer addition operator, continued
- Add support for PowerPC, with all addressing modes.
- Add support for ARM, with "reg + ofs" addressing mode.
- Add support for RISC-V, with the one addressing mode.
- Constprop.v: forgot to recurse in BA_addptr
- volatile4 test: more tests
Diffstat (limited to 'test/regression/volatile4.c')
-rw-r--r-- | test/regression/volatile4.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/regression/volatile4.c b/test/regression/volatile4.c index b72e1bb9..e363c04c 100644 --- a/test/regression/volatile4.c +++ b/test/regression/volatile4.c @@ -5,7 +5,7 @@ volatile int g = 1; volatile int b[10]; -void test1(volatile int * p) +void test1(volatile int * p, int i) { volatile int l; volatile int a[10]; @@ -18,12 +18,16 @@ void test1(volatile int * p) printf ("g = %d\n", g); b[2] = -1; printf ("b[2] = %d\n", b[2]); + b[i] = -2; + printf ("b[i] = %d\n", b[i]); p[1] = 80; printf ("p[1] = %d\n", p[1]); + p[i] = 81; + printf ("p[i] = %d\n", p[i]); } int main() { - test1(&b[0]); + test1(&b[0], 3); return 0; } |