Skip to content

gccrs: Add execute tests for supported Drop behavior - #4789

Merged
P-E-P merged 1 commit into
Rust-GCC:masterfrom
Lishin1215:additional-execute-test-cases
Aug 17, 2026
Merged

gccrs: Add execute tests for supported Drop behavior#4789
P-E-P merged 1 commit into
Rust-GCC:masterfrom
Lishin1215:additional-execute-test-cases

Conversation

@Lishin1215

Copy link
Copy Markdown
Contributor

This patch adds missing execute tests for several already-supported Drop behaviors, including:

  • multiple function parameters
  • explicit returns
  • ownership moves through function arguments and return values
  • branch-local values in both if and else

Add execute coverage for Drop behavior that is already supported but was not
covered by the testsuite.

Cover function parameter drop order, explicit returns, ownership transfers
through function arguments and return values, and branch-local values.

gcc/testsuite/ChangeLog:

	* rust/execute/drop-explicit-return.rs: Test parameter drops on explicit
	return.
	* rust/execute/drop-function-boundary-moves.rs: New test.
	* rust/execute/drop-function-params.rs: Test multiple parameter drop
	order.
	* rust/execute/drop-if-else-local.rs: New test.
@P-E-P
P-E-P added this pull request to the merge queue Aug 17, 2026
Merged via the queue into Rust-GCC:master with commit feda320 Aug 17, 2026
13 checks passed
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.

2 participants