gccrs icon indicating copy to clipboard operation
gccrs copied to clipboard

Fix ICE when trying to compile enums with non-const discriminants.

Open sakupan102 opened this issue 9 months ago • 2 comments

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-rust passes locally
  • [x] Run clang-format
  • [x] Added any relevant test cases to gcc/testsuite/rust/

sakupan102 avatar Apr 02 '25 09:04 sakupan102

some merge conflicts need fixed here

philberty avatar Apr 16 '25 11:04 philberty

@sakupan102 can you fix these merge conflicts?

philberty avatar May 13 '25 09:05 philberty

@philberty I apologize for forgetting about this PR. The merge conflicts have been resolved, so it can be merged now.

sakupan102 avatar Aug 08 '25 14:08 sakupan102