+2016-11-02 Martin Liska <mliska@suse.cz>
+
+ * fold-const-call.c (host_size_t_cst_p): Test whether
+ t is convertible to size_t.
+
2016-11-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR tree-optimization/78170
#include "case-cfn-macros.h"
#include "tm.h" /* For C[LT]Z_DEFINED_AT_ZERO. */
#include "builtins.h"
+#include "gimple-expr.h"
/* Functions that test for certain constant types, abstracting away the
decision about whether to check for overflow. */
static inline bool
host_size_t_cst_p (tree t, size_t *size_out)
{
- if (integer_cst_p (t)
+ if (types_compatible_p (size_type_node, TREE_TYPE (t))
+ && integer_cst_p (t)
&& wi::min_precision (t, UNSIGNED) <= sizeof (size_t) * CHAR_BIT)
{
*size_out = tree_to_uhwi (t);
+2016-11-02 Martin Liska <mliska@suse.cz>
+
+ * gcc.dg/tree-ssa/builtins-folding-gimple-ub.c (main): Add
+ test case.
+
2016-11-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR tree-optimization/78170