gccrs
gccrs copied to clipboard
Fix ICE when trying to compile enums with non-const discriminants.
addresses https://github.com/Rust-GCC/gccrs/issues/3635
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-item.cc (ResolveItem::visit):
add name resolution processing for discriminant values
* resolve/rust-ast-resolve-stmt.h:
add name resolution processing for discriminant values
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Exclude enum_discriminant2.rs due to ICE
* rust/compile/enum_discriminant2.rs: New test.
* rust/compile/enum_discriminant3.rs: New test.
- [x] GCC development requires copyright assignment or the Developer's Certificate of Origin sign-off, see https://gcc.gnu.org/contribute.html or https://gcc.gnu.org/dco.html
- [x] Read contributing guidlines
- [x]
make check-rustpasses locally - [x] Run
clang-format - [x] Added any relevant test cases to
gcc/testsuite/rust/
some merge conflicts need fixed here
@sakupan102 can you fix these merge conflicts?
@philberty I apologize for forgetting about this PR. The merge conflicts have been resolved, so it can be merged now.