aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2024-09-03 22:49:15 -0400
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-19 15:32:08 +0100
commit99cbcd7c45354e334f6c30a937c96cd9962b583d (patch)
treedca20c7f2697ad3673813c28da07b3bfb9b5ce2c /gcc/rust
parentca839781c9e121d80b19844b36967c2e14eaacb3 (diff)
downloadgcc-99cbcd7c45354e334f6c30a937c96cd9962b583d.zip
gcc-99cbcd7c45354e334f6c30a937c96cd9962b583d.tar.gz
gcc-99cbcd7c45354e334f6c30a937c96cd9962b583d.tar.bz2
gccrs: Fix v0-mangle1.rs test when run with ASAN
gcc/rust/ChangeLog: * util/rust-canonical-path.h (CanonicalPath::CanonicalPath): Properly initialize crate_num with copy constructor. gcc/testsuite/ChangeLog: * rust/compile/v0-mangle1.rs: Make v0-mangle test more crate_num agnostic. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/util/rust-canonical-path.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/rust/util/rust-canonical-path.h b/gcc/rust/util/rust-canonical-path.h
index af151c2..4d8f954 100644
--- a/gcc/rust/util/rust-canonical-path.h
+++ b/gcc/rust/util/rust-canonical-path.h
@@ -46,7 +46,9 @@ namespace Resolver {
class CanonicalPath
{
public:
- CanonicalPath (const CanonicalPath &other) : segs (other.segs) {}
+ CanonicalPath (const CanonicalPath &other)
+ : segs (other.segs), crate_num (other.crate_num)
+ {}
CanonicalPath &operator= (const CanonicalPath &other)
{