summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-08-10 11:16:24 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-08-10 11:16:24 +0000
commit4caa6402f1f2749b23c68338c98265db88be3c52 (patch)
treee787355a72a6fbeac8047002b5d6d8dfb159c680 /test
parent5a62dbaf613ee5e5599faa60e5bcfe346e755877 (diff)
IA32: wrong moves generated in print_builtin_memcpy_big.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1705 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test')
-rw-r--r--test/regression/Makefile2
-rw-r--r--test/regression/Results/struct111
-rw-r--r--test/regression/struct11.c39
3 files changed, 41 insertions, 1 deletions
diff --git a/test/regression/Makefile b/test/regression/Makefile
index c04788f..eb50def 100644
--- a/test/regression/Makefile
+++ b/test/regression/Makefile
@@ -11,7 +11,7 @@ LIBS=$(LIBMATH)
TESTS=attribs1 bitfields1 bitfields2 bitfields3 bitfields4 \
bitfields5 bitfields6 bitfields7 \
expr1 expr6 initializers volatile2 \
- funct3 expr5 struct7 struct8 casts1 casts2 char1 \
+ funct3 expr5 struct7 struct8 struct11 casts1 casts2 char1 \
sizeof1 sizeof2 packedstruct1
# Other tests: should compile to .s without errors (but expect warnings)
diff --git a/test/regression/Results/struct11 b/test/regression/Results/struct11
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/regression/Results/struct11
@@ -0,0 +1 @@
+0
diff --git a/test/regression/struct11.c b/test/regression/struct11.c
new file mode 100644
index 0000000..804d03c
--- /dev/null
+++ b/test/regression/struct11.c
@@ -0,0 +1,39 @@
+int printf (const char *, ...);
+
+struct S0 {
+ int : 1;
+ int f1;
+ int : 31;
+ int : 4;
+ int : 0;
+ int : 21;
+};
+
+struct S1 {
+ struct S0 f2;
+ struct S0 f3;
+ int f4;
+ int f6;
+ struct S0 f7;
+};
+
+struct S5;
+
+struct S1 g_21;
+
+int g_184;
+int *g_367 = &g_184;
+int **g_366 = &g_367;
+
+struct S5 *func_27 (struct S1 p_29, struct S5 *p_31)
+{
+ **g_366 = p_29.f7.f1;
+ return p_31;
+}
+
+int main (void)
+{
+ func_27 (g_21, 0);
+ printf ("%d\n", g_184);
+ return 0;
+}