ICE in function_set_parameters, at rust/rust-gcc.cc:2310
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 231
- Avg merge
- 19h 55m
- Merged PRs (30d)
- 67
Description
snippet:
//@compile-flags: -frust-incomplete-and-experimental-compiler-do-not-use
#![feature(no_core)]
#![no_core]
struct S;
impl S {
fn f(Self: S) {}
}
Version information:
833d880c3431f45dbe426f29270b6e69e2289d2c
Possibly related line of code:
https://github.com/Rust-GCC/gccrs/blob/833d880c3431f45dbe426f29270b6e69e2289d2c/gcc/rust/rust-gcc.cc#L2304-L2316
Command:
/home/matthias/vcs/github/gccrs/gccrs-build/gcc/crab1 -frust-incomplete-and-experimental-compiler-do-not-use
Program output
crab1: internal compiler error: in function_set_parameters, at rust/rust-gcc.cc:2310
0x322b647 internal_error(char const*, ...)
../../gcc/diagnostic-global-context.cc:787
0xc6f3c7 fancy_abort(char const*, int, char const*)
../../gcc/diagnostics/context.cc:1813
0x90cf70 Backend::function_set_parameters(tree_node*, std::vector<Bvariable*, std::allocator<Bvariable*> > const&)
../../gcc/rust/rust-gcc.cc:2310
0x11c29b5 Rust::Compile::HIRCompileBase::compile_function(bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, tl::optional<Rust::HIR::SelfParam>&, std::vector<Rust::HIR::FunctionParam, std::allocator<Rust::HIR::FunctionParam> >&, Rust::HIR::FunctionQualifiers const&, Rust::HIR::Visibility&, std::vector<Rust::AST::Attribute, std::allocator<Rust::AST::Attribute> >&, unsigned long, Rust::HIR::BlockExpr*, Rust::Resolver::CanonicalPath const&, Rust::TyTy::FnType*)
../../gcc/rust/backend/rust-compile-base.cc:786
0x11874cd Rust::Compile::CompileItem::visit(Rust::HIR::Function&)
../../gcc/rust/backend/rust-compile-item.cc:234
0x1186c2a Rust::Compile::CompileInherentImplItem::Compile(Rust::HIR::ImplItem*, Rust::Compile::Context*, Rust::TyTy::BaseType*, unsigned long)
../../gcc/rust/backend/rust-compile-implitem.h:36
0x1186c2a Rust::Compile::CompileItem::visit(Rust::HIR::ImplBlock&)
../../gcc/rust/backend/rust-compile-item.cc:259
0xebcc4b Rust::Compile::CompileItem::compile(Rust::HIR::Item*, Rust::Compile::Context*, Rust::TyTy::BaseType*, unsigned long)
../../gcc/rust/backend/rust-compile-item.h:37
0xebcc4b Rust::Compile::CompileCrate::go()
../../gcc/rust/backend/rust-compile.cc:48
0xebcc4b Rust::Compile::CompileCrate::Compile(Rust::HIR::Crate&, Rust::Compile::Context*)
../../gcc/rust/backend/rust-compile.cc:41
0xeb14d7 Rust::Session::compile_crate(char const*)
../../gcc/rust/rust-session-manager.cc:852
/home/matthias/vcs/github/gccrs/gccrs-build/gcc/crab1 /tmp/icemaker_global_tempdir.IMsnqRt9kaHb/rustc_testrunner_tmpdir_reporting.rSW4mHirLIaZ/mvce.rs -o/tmp/icemaker_global_tempdir.IMsnqRt9kaHb/rustc_testrunner_tmpdir_reporting.rSW4mHirLIaZ/binaryname -frust-incomplete-and-experimental-compiler-do-not-use
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Rust reproducer in the issue and run it with -frust-incomplete-and-experimental-compiler-do-not-use to reproduce the ICE. Read Backend::function_set_parameters in gcc/rust/rust-gcc.cc around line 2310, then trace its call from gcc/rust/rust-compile-base.cc:786. Done means this input no longer triggers an internal compiler error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100