aboutsummaryrefslogtreecommitdiffstats
path: root/test/regression
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2017-06-16 11:53:28 +0200
committerBernhard Schommer <bschommer@users.noreply.github.com>2017-07-06 15:41:51 +0200
commit2ff53c2361773f28027ccc8332e1830686d5bbc6 (patch)
tree2c0b1dc7201bd3618859cc5dc2257dbf07e996de /test/regression
parentdff22ef6d855973e0e0f05c7203a6bfa9a4cf01a (diff)
downloadcompcert-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')
-rw-r--r--test/regression/Results/volatile42
-rw-r--r--test/regression/volatile4.c8
2 files changed, 8 insertions, 2 deletions
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;
}