Comments (3)
Trying out different irrefutable patterns as parameters, will comment if any other pattern causes error.
from gccrs.
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.
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)
- Prevent `#[may_dangle]` attribute from being used in safe impl
- ICE when on invalid-code when construction enum
- Do not link with `-ldl` and `-lpthread` unless necessary
- Handle outer attributes properly for inline assembly
- Improve `-ldl -lpthread` checks in `./configure`
- Safe guard InlineAsm-related structs
- Remove unnecessary #include from rust-expr.h HOT 2
- Fully incorporate tl::expected into InlineAsm parsing
- asm! macro failed to exhaustively parse all of options(), clobber_abis() and register operands
- Typechecking of asm! failed in `let _` HOT 1
- Add ExprType::InlineAsm variant to ExprType enum HOT 1
- Cleanup vector copies from Rust to C++ in BIR HOT 2
- Add special `LangItemPath` AST node
- Make asm parser stores parse result
- Union pattern matching expecting all fields
- asm parser lacking `label` parse functionality
- Unable to find associated `type` in `trait` HOT 1
- ICE in retrieving ambiguous associated type - `E0223`
- `include_str!(file!())` does not work on godbolt HOT 2
- Test proc macros
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gccrs.