From: Trevor Saunders <tbsaunde+...@tbsaunde.org>

gcc/ChangeLog:

2015-07-26  Trevor Saunders  <tbsaunde+...@tbsaunde.org>

        * ubsan.c (ubsan_encode_value): Call targetm.pointer_size ().
---
 gcc/ubsan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/ubsan.c b/gcc/ubsan.c
index d75c4ee..55d9440 100644
--- a/gcc/ubsan.c
+++ b/gcc/ubsan.c
@@ -63,6 +63,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-object-size.h"
 #include "tree-eh.h"
 #include "tree-cfg.h"
+#include "target.h"
 
 /* Map from a tree to a VAR_DECL tree.  */
 
@@ -139,7 +140,7 @@ ubsan_encode_value (tree t, bool in_expand_p)
 {
   tree type = TREE_TYPE (t);
   const unsigned int bitsize = GET_MODE_BITSIZE (TYPE_MODE (type));
-  if (bitsize <= POINTER_SIZE)
+  if (bitsize <= targetm.pointer_size ())
     switch (TREE_CODE (type))
       {
       case BOOLEAN_TYPE:
-- 
2.4.0

Reply via email to