OSDN Git Service

* gcc.dg/guality/guality.h (GUALCVT): Zero extend instead of
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Feb 2010 12:06:38 +0000 (12:06 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Feb 2010 12:06:38 +0000 (12:06 +0000)
sign extend pointers to gualchk_t.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156733 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/guality/guality.h

index 9aaa67e..502f048 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-12  Jakub Jelinek  <jakub@redhat.com>
+
+       * gcc.dg/guality/guality.h (GUALCVT): Zero extend instead of
+       sign extend pointers to gualchk_t.
+
 2010-02-11  Sebastian Pop  <sebastian.pop@amd.com>
 
        PR middle-end/43012
index e82726b..e744d0d 100644 (file)
@@ -64,7 +64,11 @@ typedef intmax_t gualchk_t;
 #define GUALCVT(val)                                           \
   ((gualchk_t)__builtin_choose_expr                            \
    (__builtin_types_compatible_p (__typeof (val), gualchk_t),  \
-    (val), (intptr_t)(val)))
+    (val),                                                     \
+    __builtin_choose_expr                                      \
+    (__builtin_classify_type (val)                             \
+     == __builtin_classify_type (&guality_skip),               \
+     (uintptr_t)(val),(intptr_t)(val))))
 
 /* Attach a debugger to the current process and verify that the string
    EXPR, evaluated by the debugger, yields the gualchk_t number VAL.