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>
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)
{
// cf. rustc 1.72.0: _RNvNtCshIBIgX6Bzox_10v0_mangle18module_a3bar
module_a::bar();
- // { dg-final { scan-assembler "_R.*NvNtNtC10v0_mangle18module_a8module_b3baz" } }
+ // { dg-final { scan-assembler "_R.*NvNtNtC.*10v0_mangle18module_a8module_b3baz" } }
// cf. rustc 1.72.0: _RNvNtNtCshIBIgX6Bzox_10v0_mangle18module_a8module_b3baz
module_a::module_b::baz();