Skip to content

gccrs: Fix bug with non compiled const decl#3853

Merged
philberty merged 1 commit into
masterfrom
phil/const-bug
Jun 23, 2025
Merged

gccrs: Fix bug with non compiled const decl#3853
philberty merged 1 commit into
masterfrom
phil/const-bug

Conversation

@philberty

Copy link
Copy Markdown
Member

There was a sily bug where if you reorder this test case to declare A before B this test would work but its meant to work in any order. So this fixes the bug during code gen to fall back to our query compile system if this is needed.

Fixes #3525

gcc/rust/ChangeLog:

* backend/rust-compile-resolve-path.cc: if this fails fall back to query compile

gcc/testsuite/ChangeLog:

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

There was a sily bug where if you reorder this test case to declare A before B
this test would work but its meant to work in any order. So this fixes the bug
during code gen to fall back to our query compile system if this is needed.

Fixes #3525

gcc/rust/ChangeLog:

	* backend/rust-compile-resolve-path.cc: if this fails fall back to query compile

gcc/testsuite/ChangeLog:

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

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
@philberty philberty added this to the Typecheck issues 16.1 milestone Jun 23, 2025
@philberty philberty added this pull request to the merge queue Jun 23, 2025
Merged via the queue into master with commit 6aa0b64 Jun 23, 2025
12 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in libcore 1.49 Jun 23, 2025
@philberty philberty deleted the phil/const-bug branch July 10, 2025 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ICE when consts are declared out of order

1 participant