A target using 16-bit ints won't have enough bits to hold the whole flag_sanitize set. Be explicit about using uint32 for the attribute data.
Signed-off-by: Keith Packard <kei...@keithp.com> --- gcc/c-family/c-attribs.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc index 5a0e3d328ba..2a4ae10838a 100644 --- a/gcc/c-family/c-attribs.cc +++ b/gcc/c-family/c-attribs.cc @@ -1420,12 +1420,12 @@ add_no_sanitize_value (tree node, unsigned int flags) if (flags == old_value) return; - TREE_VALUE (attr) = build_int_cst (unsigned_type_node, flags); + TREE_VALUE (attr) = build_int_cst (uint32_type_node, flags); } else DECL_ATTRIBUTES (node) = tree_cons (get_identifier ("no_sanitize"), - build_int_cst (unsigned_type_node, flags), + build_int_cst (uint32_type_node, flags), DECL_ATTRIBUTES (node)); } -- 2.49.0