summaryrefslogtreecommitdiff
path: root/test/regression/struct9.c
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-11-10 12:34:24 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-11-10 12:34:24 +0000
commitec604c3c577443a3bbc436d0cbcc06b6b67f3851 (patch)
tree2dfbb67b9cc2e3425926b401dfb295ddbc67555f /test/regression/struct9.c
parente884946c8788db4eb791fa93761d487b9de13ae4 (diff)
In StructAssign: be careful not to duplicate accesses to a volatile variable.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1551 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/regression/struct9.c')
-rw-r--r--test/regression/struct9.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/regression/struct9.c b/test/regression/struct9.c
new file mode 100644
index 0000000..fae137c
--- /dev/null
+++ b/test/regression/struct9.c
@@ -0,0 +1,13 @@
+struct S1 {
+ unsigned char f0;
+ short f1;
+};
+
+struct S1 g_77 = {0x73,9};
+struct S1 * volatile g_85 = &g_77;
+struct S1 g_204 = {0xAD,0x9086};
+
+void func_1(void)
+{
+ *g_85 = g_204;
+}