Code Monkey home page Code Monkey logo

Comments (3)

0xn4utilus avatar 0xn4utilus commented on July 22, 2024

Trying out different irrefutable patterns as parameters, will comment if any other pattern causes error.

from gccrs.

0xn4utilus avatar 0xn4utilus commented on July 22, 2024

While investigating this bug, I tried out this: https://godbolt.org/z/3s398sW1r

The below code compiles correctly.

fn myfun() -> i32 {
    let (x, a) =  (1, 2);
    x
}

This causes internal compiler error.

fn myfun() -> i32 {
    let (x, _) =  (1, 2);
    x
}

from gccrs.

CohenArthur avatar CohenArthur commented on July 22, 2024

ICE backtrace:

crab1: internal compiler error: in function_set_parameters, at rust/rust-gcc.cc:2284
0x236722c internal_error(char const*, ...)
	???:0
0x9fc228 fancy_abort(char const*, int, char const*)
	???:0
0xd8e28d Rust::Compile::HIRCompileBase::compile_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, 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 int, Rust::HIR::BlockExpr*, Rust::Resolver::CanonicalPath const*, Rust::TyTy::FnType*)
	???:0
0xd64d3a Rust::Compile::CompileItem::visit(Rust::HIR::Function&)
	???:0
0xb3c829 Rust::Compile::CompileCrate::go()
	???:0
0xb3c8a8 Rust::Compile::CompileCrate::Compile(Rust::HIR::Crate&, Rust::Compile::Context*)
	???:0
0xb37b7c Rust::Session::compile_crate(char const*)
	???:0
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.
Compiler returned: 1

from gccrs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.