From 2b1c0aa69adafac185dd6c4e460d83517bcc8884 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Wed, 8 Jul 2015 10:16:53 +0200 Subject: Fix issue with bit fields of type _Bool cparser/Bitfields.ml: when assigning to a bit field of type _Bool, the right-hand side must be normalized to 0 or 1 via a cast to _Bool. test/regression/bitfields{1,9}.c: add corresponding test cases. --- test/regression/Results/bitfields9 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/regression/Results') diff --git a/test/regression/Results/bitfields9 b/test/regression/Results/bitfields9 index ca74f1f4..a1d0e9fd 100644 --- a/test/regression/Results/bitfields9 +++ b/test/regression/Results/bitfields9 @@ -1,10 +1,10 @@ glob_s = { a = -12, b = 1 } -glob_t = { c = 123, d = 0, e = -45 } +glob_t = { c = 123, d = 1, e = -45 } loc_s = { a = 11, b = 2 } loc_t = { c = 11, d = 1, e = 2 } compound_s = { a = 2, b = 3 } -compound_t = { c = 2, d = 0, e = -11 } +compound_t = { c = 2, d = 1, e = -11 } loc_s = { a = 7, b = 2 } loc_t = { c = 7, d = 1, e = 50 } compound_s = { a = -14, b = 3 } -compound_t = { c = 50, d = 0, e = -7 } +compound_t = { c = 50, d = 1, e = -7 } -- cgit From f869da75c970aec78975f7154c806f29e3012b7a Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Wed, 8 Jul 2015 11:42:39 +0200 Subject: Turn off copy optimization when returning a composite by reference. The copy optimization is not correct in case of overlap between destination and source. We would need to use an hypothetical __builtin_memmove_aligned that can cope with overlap to implement the copy at return of callee. --- test/regression/Results/struct12 | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test/regression/Results/struct12 (limited to 'test/regression/Results') diff --git a/test/regression/Results/struct12 b/test/regression/Results/struct12 new file mode 100644 index 00000000..e69de29b -- cgit