From 2ff53c2361773f28027ccc8332e1830686d5bbc6 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Fri, 16 Jun 2017 11:53:28 +0200 Subject: 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 --- test/regression/Results/volatile4 | 2 ++ test/regression/volatile4.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/regression/Results/volatile4 b/test/regression/Results/volatile4 index e650a8e5..e00651de 100644 --- a/test/regression/Results/volatile4 +++ b/test/regression/Results/volatile4 @@ -2,4 +2,6 @@ l = 42 a[5] = 255 g = 3 b[2] = -1 +b[i] = -2 p[1] = 80 +p[i] = 81 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; } -- cgit