Fix intrinsic error location#4502
Open
Jean-Christian-Cirstea wants to merge 1 commit intoRust-GCC:masterfrom
Open
Fix intrinsic error location#4502Jean-Christian-Cirstea wants to merge 1 commit intoRust-GCC:masterfrom
Jean-Christian-Cirstea wants to merge 1 commit intoRust-GCC:masterfrom
Conversation
CohenArthur
reviewed
Mar 26, 2026
Member
CohenArthur
left a comment
There was a problem hiding this comment.
The changes look good to me but there are a couple issues with the testsuite where error locations haven't been updated, e.g. rust/compile/torture/intrinsics-5.rs and rust/compile/torture/intrinsics-7.rs. But overall I'm happy with this and once it's fixed I'd like to get it merged :) Thank you!
64f7a4a to
9c25095
Compare
When an intrisic is used with an incorrect type, prin the location of the call site, not the declaration. Fixes Rust-GCC#4465. gcc/rust/ChangeLog: * backend/rust-intrinsic-handlers.cc: use call site error location instead of the declaration location gcc/testsuite/ChangeLog: * rust/compile/bswap.rs: update error location * rust/compile/ctlz.rs: update error location * rust/compile/ctlz_nonzero.rs: update error location * rust/compile/torture/intrinsics-5.rs: update error location * rust/compile/torture/intrinsics-7.rs: update error location Signed-off-by: Jean-Christian CÎRSTEA <jean-christian.cirstea@tuta.com>
9c25095 to
d6a11ed
Compare
Member
|
👋 It's supposed to be: you should have the list of all modified functions. The helper script should correctly provide you with a sensible skeleton. |
P-E-P
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an intrisic is used with an incorrect type, prin the location of
the call site, not the declaration.
Fixes #4465.
gcc/rust/ChangeLog:
gcc/testsuite/ChangeLog: