]>
git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: fix segfault on exported macro
An imbricated exported macro leads to a segfault.
gcc/rust/ChangeLog:
* metadata/rust-export-metadata.cc (ExportContext::emit_macro):
Change method argument NodeId to AST::MacroRulesDefinition.
* metadata/rust-export-metadata.h:
Likewise.
* util/rust-hir-map.cc (Mappings::insert_exported_macro):
Insert AST::MacroRulesDefinition instead of NodeId.
* util/rust-hir-map.h:
Change methods declarations of exported macros.
gcc/testsuite/ChangeLog:
* rust/compile/issue-3617.rs: New test.
Signed-off-by: Lucas Ly Ba <lucas.ly-ba@outlook.fr>