-
Notifications
You must be signed in to change notification settings - Fork 189
Closed
Labels
Description
auto-reduced (treereduce-rust):
//@compile-flags: -frust-incomplete-and-experimental-compiler-do-not-use
fn main() {
[(); { continue }];
}
original:
fn main() {
loop { continue } //~ ERROR mismatched types
[(); {while true {break}; 0}]; //~ ERROR mismatched types
[(); { continue }];
//~| ERROR cannot use `for`
[(); {while true {break}; 0}];
//~^ ERROR cannot use `for`
//~| ERROR cannot use `for`
}
Version information:
Command:
/home/matthias/vcs/github/gccrs/gccrs-build/gcc/crab1 -frust-incomplete-and-experimental-compiler-do-not-use
Program output
/tmp/icemaker_global_tempdir.GXnaiw1my9zS/rustc_testrunner_tmpdir_reporting.MPS27Op9ZIJj/mvce.rs:2:12: error: ‘continue’ outside of a loop [E0268]
2 | [(); { continue }];
| ^~~~~~~~
/tmp/icemaker_global_tempdir.GXnaiw1my9zS/rustc_testrunner_tmpdir_reporting.MPS27Op9ZIJj/mvce.rs:2:5: error: mismatched types, expected ‘usize’ but got ‘<tyty::error>’ [E0308]
2 | [(); { continue }];
| ^ ~
crab1: internal compiler error: Segmentation fault
0x2fecaf8 internal_error(char const*, ...)
../../gcc/diagnostic-global-context.cc:517
0x196d57f crash_signal
../../gcc/toplev.cc:321
0x11626eb ???
../../gcc/rust/backend/rust-compile-expr.h:63
0x1162c76 Rust::Compile::CompileExpr::Compile(Rust::HIR::Expr&, Rust::Compile::Context*)
../../gcc/rust/backend/rust-compile-expr.cc:48
0x118aa61 Rust::Compile::HIRCompileBase::compile_function_body(tree_node*, Rust::HIR::BlockExpr&, Rust::TyTy::BaseType*)
../../gcc/rust/backend/rust-compile-base.cc:625
0x118eb94 Rust::Compile::HIRCompileBase::compile_constant_item(unsigned int, Rust::TyTy::BaseType*, Rust::TyTy::BaseType*, Rust::Resolver::CanonicalPath const&, Rust::HIR::Expr&, unsigned long, unsigned long)
../../gcc/rust/backend/rust-compile-base.cc:865
0x118f044 Rust::Compile::HIRCompileBase::compile_constant_expr(Rust::Compile::Context*, unsigned int, Rust::TyTy::BaseType*, Rust::TyTy::BaseType*, Rust::Resolver::CanonicalPath const&, Rust::HIR::Expr&, unsigned long, unsigned long)
../../gcc/rust/backend/rust-compile-base.cc:573
0x118f044 Rust::Compile::HIRCompileBase::query_compile_const_expr(Rust::Compile::Context*, Rust::TyTy::BaseType*, Rust::HIR::Expr&)
../../gcc/rust/backend/rust-compile-base.cc:588
0x109f8c0 Rust::Resolver::TypeCheckExpr::visit(Rust::HIR::ArrayExpr&)
../../gcc/rust/typecheck/rust-hir-type-check-expr.cc:1111
0x109a4d4 Rust::Resolver::TypeCheckExpr::Resolve(Rust::HIR::Expr&)
../../gcc/rust/typecheck/rust-hir-type-check-expr.cc:50
0x10a9acc ???
../../gcc/rust/typecheck/rust-hir-type-check-stmt.h:33
0x10aa163 Rust::Resolver::TypeCheckStmt::Resolve(Rust::HIR::Stmt&)
../../gcc/rust/typecheck/rust-hir-type-check-stmt.cc:34
0x109bef1 Rust::Resolver::TypeCheckExpr::visit(Rust::HIR::BlockExpr&)
../../gcc/rust/typecheck/rust-hir-type-check-expr.cc:609
0x109a4d4 Rust::Resolver::TypeCheckExpr::Resolve(Rust::HIR::Expr&)
../../gcc/rust/typecheck/rust-hir-type-check-expr.cc:50
0x10773f0 Rust::Resolver::TypeCheckItem::visit(Rust::HIR::Function&)
../../gcc/rust/typecheck/rust-hir-type-check-item.cc:642
0x106e185 Rust::Resolver::TypeCheckItem::Resolve(Rust::HIR::Item&)
../../gcc/rust/typecheck/rust-hir-type-check-item.cc:59
0x100adcb Rust::Resolver::TypeResolution::Resolve(Rust::HIR::Crate&)
../../gcc/rust/typecheck/rust-hir-type-check.cc:74
0xdb97f8 Rust::Session::compile_crate(char const*)
../../gcc/rust/rust-session-manager.cc:685
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.