From: Pierre-Emmanuel Patry <[email protected]>
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 <[email protected]>
---
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.50.1