https://gcc.gnu.org/g:a82985a0acfb19dd1b2f0b7ead6c0fe34ccd8576

commit r17-4010-ga82985a0acfb19dd1b2f0b7ead6c0fe34ccd8576
Author: Kael Andrew Alonzo Franco <[email protected]>
Date:   Tue Sep 8 16:04:53 2026 -0400

    rust: Convert build_int_cst (NULL_TREE, cst). [PR126622]
    
    build_int_cst converts NULL_TREE to integer_type_node.
    Use build_int_cst (integer_type_node, cst) to
    to remove build_int_cst_type in the future.
    
    Bootstrapped and regtested on x86_64-pc-linux-gnu.
    
            PR middle-end/126622
    
    gcc/rust/ChangeLog:
    
            * backend/rust-builtins.cc (DEF_ATTR_INT): Use
            build_int_cst (integer_type_node, cst).
    
    Reviewed-by: Richard Biener <[email protected]>
    Signed-off-by: Kael Andrew Franco <[email protected]>

Diff:
---
 gcc/rust/backend/rust-builtins.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/rust/backend/rust-builtins.cc 
b/gcc/rust/backend/rust-builtins.cc
index 881561fdde37..d4b072a03e7c 100644
--- a/gcc/rust/backend/rust-builtins.cc
+++ b/gcc/rust/backend/rust-builtins.cc
@@ -228,7 +228,7 @@ BuiltinsContext::define_builtin_attributes ()
 
 #define DEF_ATTR_NULL_TREE(ENUM) built_in_attributes[(int) ENUM] = NULL_TREE;
 #define DEF_ATTR_INT(ENUM, VALUE)                                              
\
-  built_in_attributes[ENUM] = build_int_cst (NULL_TREE, VALUE);
+  built_in_attributes[ENUM] = build_int_cst (integer_type_node, VALUE);
 #define DEF_ATTR_STRING(ENUM, VALUE)                                           
\
   built_in_attributes[ENUM] = build_string (strlen (VALUE), VALUE);
 #define DEF_ATTR_IDENT(ENUM, STRING)                                           
\

Reply via email to