[Pixman] [PATCH] Workaround bug in llvm-gcc
Andrea Canciani
ranma42 at gmail.com
Tue Aug 16 06:33:10 PDT 2011
llvm-gcc (shipped in Apple XCode 4.1.1) as the default compiler
performs an invalid optimization which unifies the empty_region and
the bad_region structures because they have the same content.
A bug has been filed against Apple Developers Tool for this
issue. This commit works around this bug by making the content of the
two structures different.
Fixes region-contains-test.
---
pixman/pixman-region.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c
index 9ff5157..9074fe4 100644
--- a/pixman/pixman-region.c
+++ b/pixman/pixman-region.c
@@ -102,7 +102,7 @@
static const box_type_t PREFIX (_empty_box_) = { 0, 0, 0, 0 };
static const region_data_type_t PREFIX (_empty_data_) = { 0, 0 };
-static const region_data_type_t PREFIX (_broken_data_) = { 0, 0 };
+static const region_data_type_t PREFIX (_broken_data_) = { -1, 0 };
static box_type_t *pixman_region_empty_box =
(box_type_t *)&PREFIX (_empty_box_);
--
1.7.4.4
More information about the Pixman
mailing list