Skip to content

gccrs: Fix ICE cloning trait functions without return types#4532

Open
Lishin1215 wants to merge 1 commit intoRust-GCC:masterfrom
Lishin1215:3972
Open

gccrs: Fix ICE cloning trait functions without return types#4532
Lishin1215 wants to merge 1 commit intoRust-GCC:masterfrom
Lishin1215:3972

Conversation

@Lishin1215
Copy link
Copy Markdown
Contributor

gcc/rust/ChangeLog:

	* hir/tree/rust-hir-item.cc (TraitFunctionDecl::TraitFunctionDecl): 
	Handle null return types in copy constructor.
	(TraitFunctionDecl::operator=): Likewise.

gcc/testsuite/ChangeLog:

	* rust/compile/issue-3972.rs: New test.

gcc/rust/ChangeLog:

	* hir/tree/rust-hir-item.cc (TraitFunctionDecl::TraitFunctionDecl):
	Handle null return types in copy constructor.
	(TraitFunctionDecl::operator=): Likewise.

gcc/testsuite/ChangeLog:

	* rust/compile/issue-3972.rs: New test.

Signed-off-by: lishin <lishin1008@gmail.com>
@Lishin1215
Copy link
Copy Markdown
Contributor Author

Hi, I think this could fix #3972.
Please let me know if this approach makes sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant