diff options
Diffstat (limited to 'gcc/ubsan.c')
-rw-r--r-- | gcc/ubsan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ubsan.c b/gcc/ubsan.c index a118af297f8..d3bd8e3393d 100644 --- a/gcc/ubsan.c +++ b/gcc/ubsan.c @@ -1469,7 +1469,7 @@ ubsan_use_new_style_p (location_t loc) expanded_location xloc = expand_location (loc); if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0 - || xloc.file == '\0' || xloc.file[0] == '\xff' + || xloc.file[0] == '\0' || xloc.file[0] == '\xff' || xloc.file[1] == '\xff') return false; @@ -1826,8 +1826,8 @@ instrument_object_size (gimple_stmt_iterator *gsi, bool is_lhs) if (decl_p) base_addr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (base)), base); - unsigned HOST_WIDE_INT size = compute_builtin_object_size (base_addr, 0); - if (size != HOST_WIDE_INT_M1U) + unsigned HOST_WIDE_INT size; + if (compute_builtin_object_size (base_addr, 0, &size)) sizet = build_int_cst (sizetype, size); else if (optimize) { |