From dc45c079d91fc1b991f63e6c65637f26a866fa88 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Tue, 5 Aug 2025 11:45:00 +0200 Subject: [PATCH] gccrs: Copy cfg_attrs instead setting it to itself CfgAttribute copy constructor did not copy cfg_attrs properly. gcc/rust/ChangeLog: * ast/rust-cond-compilation.h: Copy cfg_attrs Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-cond-compilation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/ast/rust-cond-compilation.h b/gcc/rust/ast/rust-cond-compilation.h index 56a5646704a..4beb33768d6 100644 --- a/gcc/rust/ast/rust-cond-compilation.h +++ b/gcc/rust/ast/rust-cond-compilation.h @@ -226,7 +226,7 @@ public: CfgAttrAttribute (CfgAttrAttribute const &other) : config_to_include ( other.config_to_include->clone_configuration_predicate ()), - cfg_attrs (cfg_attrs) + cfg_attrs (other.cfg_attrs) {} // Overloaded assignment operator to clone -- 2.47.3