]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Copy cfg_attrs instead setting it to itself
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 5 Aug 2025 09:45:00 +0000 (11:45 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 30 Oct 2025 19:58:34 +0000 (20:58 +0100)
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 <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-cond-compilation.h

index 56a5646704a8b8ff9fab2b8166cf0fb55b8e501b..4beb33768d609e2d11d0e7033e95d905f8d1333d 100644 (file)
@@ -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