diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-11-10 12:34:24 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-11-10 12:34:24 +0000 |
commit | ec604c3c577443a3bbc436d0cbcc06b6b67f3851 (patch) | |
tree | 2dfbb67b9cc2e3425926b401dfb295ddbc67555f /test | |
parent | e884946c8788db4eb791fa93761d487b9de13ae4 (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')
-rw-r--r-- | test/regression/Makefile | 2 | ||||
-rw-r--r-- | test/regression/struct9.c | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/test/regression/Makefile b/test/regression/Makefile index c1925c7..a385cc4 100644 --- a/test/regression/Makefile +++ b/test/regression/Makefile @@ -16,7 +16,7 @@ TESTS=bitfields1 bitfields2 bitfields3 bitfields4 \ # Other tests: should compile to .s without errors (but expect warnings) EXTRAS=annot1 commaprec expr2 expr3 expr4 extern1 funct2 funptr1 init1 \ init2 init3 init4 pragmas ptrs1 ptrs2 sizeof1 struct1 struct2 struct3 \ - struct4 struct5 struct6 types1 volatile1 + struct4 struct5 struct6 struct9 types1 volatile1 # Test known to fail FAILURES=funct1 varargs1 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; +} |