+2017-12-18 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/83463
+ * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref):
+ Check if TYPE is INTEGRAL_TYPE_P before accessing its min/max
+ values.
+
2017-12-18 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.md (maddsidi4, maddsidi4_split): Update pattern.
else
{
gimple *stmt = SSA_NAME_DEF_STMT (offset);
+ tree type;
if (is_gimple_assign (stmt)
- && gimple_assign_rhs_code (stmt) == NOP_EXPR)
+ && gimple_assign_rhs_code (stmt) == NOP_EXPR
+ && (type = TREE_TYPE (gimple_assign_rhs1 (stmt)))
+ && INTEGRAL_TYPE_P (type))
{
/* Use the bounds of the type of the NOP_EXPR operand
even if it's signed. The result doesn't trigger
warnings but makes their output more readable. */
- tree type = TREE_TYPE (gimple_assign_rhs1 (stmt));
offrange[0] = wi::to_offset (TYPE_MIN_VALUE (type));
offrange[1] = wi::to_offset (TYPE_MAX_VALUE (type));
}