From: Pierre-Emmanuel Patry Date: Tue, 5 Aug 2025 09:45:00 +0000 (+0200) Subject: gccrs: Copy cfg_attrs instead setting it to itself X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc45c079d91fc1b991f63e6c65637f26a866fa88;p=thirdparty%2Fgcc.git 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 --- 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