Remove c_unwind from tests and fix tests
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
extern "C-unwind" fn unwind() {
|
extern "C-unwind" fn unwind() {
|
||||||
panic!();
|
panic!();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
|
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
|
||||||
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
|
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
|
||||||
//@[definition,both]error-in-other-file: aborted execution
|
//@[definition,both]error-in-other-file: aborted execution
|
||||||
#![feature(rustc_attrs, c_unwind)]
|
#![feature(rustc_attrs)]
|
||||||
|
|
||||||
#[cfg_attr(any(definition, both), rustc_nounwind)]
|
#[cfg_attr(any(definition, both), rustc_nounwind)]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
//! Unwinding when the caller ABI is "C" (without "-unwind") is UB.
|
//! Unwinding when the caller ABI is "C" (without "-unwind") is UB.
|
||||||
// The opposite version (callee does not allow unwinding) is impossible to
|
// The opposite version (callee does not allow unwinding) is impossible to
|
||||||
// even write: MIR validation catches functions that have `UnwindContinue` but
|
// even write: MIR validation catches functions that have `UnwindContinue` but
|
||||||
|
|||||||
@@ -7,8 +7,6 @@
|
|||||||
// Enable MIR inlining to ensure that `TerminatorKind::UnwindTerminate` is generated
|
// Enable MIR inlining to ensure that `TerminatorKind::UnwindTerminate` is generated
|
||||||
// instead of just `UnwindAction::Terminate`.
|
// instead of just `UnwindAction::Terminate`.
|
||||||
|
|
||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
struct Foo;
|
struct Foo;
|
||||||
|
|
||||||
impl Drop for Foo {
|
impl Drop for Foo {
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
//@normalize-stderr-test: "\| +\^+" -> "| ^"
|
//@normalize-stderr-test: "\| +\^+" -> "| ^"
|
||||||
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
|
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
|
||||||
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
|
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
|
||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
extern "C" fn panic_abort() {
|
extern "C" fn panic_abort() {
|
||||||
panic!()
|
panic!()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// found in this form" errors works without `-C prefer-dynamic` (`panic!` calls foreign function
|
// found in this form" errors works without `-C prefer-dynamic` (`panic!` calls foreign function
|
||||||
// `__rust_start_panic`).
|
// `__rust_start_panic`).
|
||||||
// no-prefer-dynamic
|
// no-prefer-dynamic
|
||||||
#![feature(c_unwind, unboxed_closures)]
|
#![feature(unboxed_closures)]
|
||||||
|
|
||||||
use std::panic;
|
use std::panic;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//@ assembly-output: emit-asm
|
//@ assembly-output: emit-asm
|
||||||
//@ compile-flags: -O
|
//@ compile-flags: -O -C panic=abort
|
||||||
//@ compile-flags: --target aarch64-unknown-linux-gnu
|
//@ compile-flags: --target aarch64-unknown-linux-gnu
|
||||||
//@ needs-llvm-components: aarch64
|
//@ needs-llvm-components: aarch64
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//@ assembly-output: emit-asm
|
//@ assembly-output: emit-asm
|
||||||
//@ compile-flags: -O
|
//@ compile-flags: -O -C panic=abort
|
||||||
//@ compile-flags: --target armv7-unknown-linux-gnueabihf
|
//@ compile-flags: --target armv7-unknown-linux-gnueabihf
|
||||||
//@ compile-flags: -C target-feature=+neon
|
//@ compile-flags: -C target-feature=+neon
|
||||||
//@ needs-llvm-components: arm
|
//@ needs-llvm-components: arm
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//@ revisions: x86_64 i686
|
//@ revisions: x86_64 i686
|
||||||
//@ assembly-output: emit-asm
|
//@ assembly-output: emit-asm
|
||||||
//@ compile-flags: -O
|
//@ compile-flags: -O -C panic=abort
|
||||||
//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
|
//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
|
||||||
//@[x86_64] needs-llvm-components: x86
|
//@[x86_64] needs-llvm-components: x86
|
||||||
//@[i686] compile-flags: --target i686-unknown-linux-gnu
|
//@[i686] compile-flags: --target i686-unknown-linux-gnu
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
//@ [aarch64] needs-llvm-components: aarch64
|
//@ [aarch64] needs-llvm-components: aarch64
|
||||||
//@ [aarch64] min-llvm-version: 18.0
|
//@ [aarch64] min-llvm-version: 18.0
|
||||||
//@ assembly-output: emit-asm
|
//@ assembly-output: emit-asm
|
||||||
//@ compile-flags: --crate-type=lib -O
|
//@ compile-flags: --crate-type=lib -O -C panic=abort
|
||||||
|
|
||||||
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
||||||
#![no_core]
|
#![no_core]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
//@ [x86-avx512] needs-llvm-components: x86
|
//@ [x86-avx512] needs-llvm-components: x86
|
||||||
//@ [x86-avx512] min-llvm-version: 18.0
|
//@ [x86-avx512] min-llvm-version: 18.0
|
||||||
//@ assembly-output: emit-asm
|
//@ assembly-output: emit-asm
|
||||||
//@ compile-flags: --crate-type=lib -O
|
//@ compile-flags: --crate-type=lib -O -C panic=abort
|
||||||
|
|
||||||
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
||||||
#![no_core]
|
#![no_core]
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
//@ [x86-avx512] compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bw,+avx512dq
|
//@ [x86-avx512] compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bw,+avx512dq
|
||||||
//@ [x86-avx512] needs-llvm-components: x86
|
//@ [x86-avx512] needs-llvm-components: x86
|
||||||
//@ assembly-output: emit-asm
|
//@ assembly-output: emit-asm
|
||||||
//@ compile-flags: --crate-type=lib -O
|
//@ compile-flags: --crate-type=lib -O -C panic=abort
|
||||||
|
|
||||||
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
||||||
#![no_core]
|
#![no_core]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
//@ [aarch64] needs-llvm-components: aarch64
|
//@ [aarch64] needs-llvm-components: aarch64
|
||||||
//@ [aarch64] min-llvm-version: 18.0
|
//@ [aarch64] min-llvm-version: 18.0
|
||||||
//@ assembly-output: emit-asm
|
//@ assembly-output: emit-asm
|
||||||
//@ compile-flags: --crate-type=lib -O
|
//@ compile-flags: --crate-type=lib -O -C panic=abort
|
||||||
|
|
||||||
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
||||||
#![no_core]
|
#![no_core]
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
//@ [x86-avx512] compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bw,+avx512dq
|
//@ [x86-avx512] compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bw,+avx512dq
|
||||||
//@ [x86-avx512] needs-llvm-components: x86
|
//@ [x86-avx512] needs-llvm-components: x86
|
||||||
//@ assembly-output: emit-asm
|
//@ assembly-output: emit-asm
|
||||||
//@ compile-flags: --crate-type=lib -O
|
//@ compile-flags: --crate-type=lib -O -C panic=abort
|
||||||
|
|
||||||
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
||||||
#![no_core]
|
#![no_core]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
//@ [x86-avx512] needs-llvm-components: x86
|
//@ [x86-avx512] needs-llvm-components: x86
|
||||||
//@ [x86-avx512] min-llvm-version: 18.0
|
//@ [x86-avx512] min-llvm-version: 18.0
|
||||||
//@ assembly-output: emit-asm
|
//@ assembly-output: emit-asm
|
||||||
//@ compile-flags: --crate-type=lib -O
|
//@ compile-flags: --crate-type=lib -O -C panic=abort
|
||||||
|
|
||||||
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
||||||
#![no_core]
|
#![no_core]
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
//@ [aarch64] needs-llvm-components: aarch64
|
//@ [aarch64] needs-llvm-components: aarch64
|
||||||
//@ [aarch64] min-llvm-version: 18.0
|
//@ [aarch64] min-llvm-version: 18.0
|
||||||
//@ assembly-output: emit-asm
|
//@ assembly-output: emit-asm
|
||||||
//@ compile-flags: --crate-type=lib -O
|
//@ compile-flags: --crate-type=lib -O -C panic=abort
|
||||||
|
|
||||||
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
#![feature(no_core, lang_items, repr_simd, intrinsics)]
|
||||||
#![no_core]
|
#![no_core]
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
// ignore-tidy-linelength
|
// ignore-tidy-linelength
|
||||||
//@ revisions:i686-linux x86_64-linux
|
//@ revisions:i686-linux x86_64-linux
|
||||||
|
|
||||||
//@[i686-linux] compile-flags: --target i686-unknown-linux-gnu
|
//@[i686-linux] compile-flags: --target i686-unknown-linux-gnu -C panic=abort
|
||||||
//@[i686-linux] needs-llvm-components: x86
|
//@[i686-linux] needs-llvm-components: x86
|
||||||
//@[x86_64-linux] compile-flags: --target x86_64-unknown-linux-gnu
|
//@[x86_64-linux] compile-flags: --target x86_64-unknown-linux-gnu -C panic=abort
|
||||||
//@[x86_64-linux] needs-llvm-components: x86
|
//@[x86_64-linux] needs-llvm-components: x86
|
||||||
|
|
||||||
// Tests that we correctly copy arguments into allocas when the alignment of the byval argument
|
// Tests that we correctly copy arguments into allocas when the alignment of the byval argument
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//@ compile-flags: -O --target=avr-unknown-gnu-atmega328 --crate-type=rlib
|
//@ compile-flags: -O --target=avr-unknown-gnu-atmega328 --crate-type=rlib -C panic=abort
|
||||||
//@ needs-llvm-components: avr
|
//@ needs-llvm-components: avr
|
||||||
|
|
||||||
// This test validates that function pointers can be stored in global variables
|
// This test validates that function pointers can be stored in global variables
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
//@ ignore-loongarch64 FIXME
|
//@ ignore-loongarch64 FIXME
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
fn bar();
|
fn bar();
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
#![feature(c_variadic)]
|
#![feature(c_variadic)]
|
||||||
#![feature(c_unwind)]
|
|
||||||
#![no_std]
|
#![no_std]
|
||||||
use core::ffi::VaList;
|
use core::ffi::VaList;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//@ compile-flags: -g -O
|
//@ compile-flags: -g -O -C panic=abort
|
||||||
|
|
||||||
// Check that each inline call site for the same function uses the same "sub-program" so that LLVM
|
// Check that each inline call site for the same function uses the same "sub-program" so that LLVM
|
||||||
// can correctly merge the debug info if it merges the inlined code (e.g., for merging of tail
|
// can correctly merge the debug info if it merges the inlined code (e.g., for merging of tail
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//@ needs-llvm-components: arm
|
//@ needs-llvm-components: arm
|
||||||
//@ compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -Cno-prepopulate-passes
|
//@ compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -Cno-prepopulate-passes
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![feature(no_core, lang_items, c_unwind)]
|
#![feature(no_core, lang_items)]
|
||||||
#[lang = "sized"]
|
#[lang = "sized"]
|
||||||
trait Sized {}
|
trait Sized {}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
// when the code is compiled with `panic=abort`.
|
// when the code is compiled with `panic=abort`.
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
// CHECK: @rust_item_that_can_unwind() unnamed_addr [[ATTR0:#[0-9]+]]
|
// CHECK: @rust_item_that_can_unwind() unnamed_addr [[ATTR0:#[0-9]+]]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
// to prevent LLVM from inferring the attribute.
|
// to prevent LLVM from inferring the attribute.
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 {
|
// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
// disable optimizations above to prevent LLVM from inferring the attribute.
|
// disable optimizations above to prevent LLVM from inferring the attribute.
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 {
|
// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//@ needs-llvm-components: x86
|
//@ needs-llvm-components: x86
|
||||||
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
|
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![feature(no_core, lang_items, c_unwind)]
|
#![feature(no_core, lang_items)]
|
||||||
#[lang = "sized"]
|
#[lang = "sized"]
|
||||||
trait Sized {}
|
trait Sized {}
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
//@ compile-flags: -C opt-level=0
|
|
||||||
//@ needs-unwind
|
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
|
||||||
|
|
||||||
// We disable optimizations to prevent LLVM from inferring the attribute.
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
fn bar();
|
|
||||||
}
|
|
||||||
|
|
||||||
// CHECK-NOT: Function Attrs:{{.*}}nounwind
|
|
||||||
pub unsafe extern "C" fn foo() {
|
|
||||||
bar();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Note that this test will get removed when `C-unwind` is fully stabilized
|
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
//@ needs-unwind
|
//@ needs-unwind
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
// We disable optimizations to prevent LLVM from inferring the attribute.
|
// We disable optimizations to prevent LLVM from inferring the attribute.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//@ needs-llvm-components: x86
|
//@ needs-llvm-components: x86
|
||||||
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
|
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![feature(no_core, lang_items, c_unwind)]
|
#![feature(no_core, lang_items)]
|
||||||
#[lang = "sized"]
|
#[lang = "sized"]
|
||||||
trait Sized {}
|
trait Sized {}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
// optimizations above to prevent LLVM from inferring the attribute.
|
// optimizations above to prevent LLVM from inferring the attribute.
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 {
|
// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//@ needs-llvm-components: x86
|
//@ needs-llvm-components: x86
|
||||||
//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
|
//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![feature(no_core, lang_items, c_unwind)]
|
#![feature(no_core, lang_items)]
|
||||||
#[lang = "sized"]
|
#[lang = "sized"]
|
||||||
trait Sized {}
|
trait Sized {}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//@ needs-llvm-components: x86
|
//@ needs-llvm-components: x86
|
||||||
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
|
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![feature(no_core, lang_items, c_unwind)]
|
#![feature(no_core, lang_items)]
|
||||||
#[lang = "sized"]
|
#[lang = "sized"]
|
||||||
trait Sized {}
|
trait Sized {}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//@ needs-llvm-components: x86
|
//@ needs-llvm-components: x86
|
||||||
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
|
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![feature(no_core, lang_items, c_unwind, abi_vectorcall)]
|
#![feature(no_core, lang_items, abi_vectorcall)]
|
||||||
#[lang = "sized"]
|
#[lang = "sized"]
|
||||||
trait Sized {}
|
trait Sized {}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//@ needs-llvm-components: x86
|
//@ needs-llvm-components: x86
|
||||||
//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
|
//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![feature(no_core, lang_items, c_unwind)]
|
#![feature(no_core, lang_items)]
|
||||||
#[lang = "sized"]
|
#[lang = "sized"]
|
||||||
trait Sized {}
|
trait Sized {}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
//@ compile-flags: -C panic=abort
|
//@ compile-flags: -C panic=abort
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
extern "C-unwind" {
|
extern "C-unwind" {
|
||||||
fn bar();
|
fn bar();
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
//@ needs-unwind
|
//@ needs-unwind
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
// Make sure these all do *not* get the attribute.
|
// Make sure these all do *not* get the attribute.
|
||||||
// We disable optimizations to prevent LLVM from inferring the attribute.
|
// We disable optimizations to prevent LLVM from inferring the attribute.
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
//@ needs-unwind
|
//@ needs-unwind
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
// CHECK: Function Attrs:{{.*}}nounwind
|
// CHECK: Function Attrs:{{.*}}nounwind
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Function name: abort::main
|
Function name: abort::main
|
||||||
Raw bytes (89): 0x[01, 01, 0a, 01, 27, 05, 09, 03, 0d, 22, 11, 03, 0d, 03, 0d, 22, 15, 03, 0d, 03, 0d, 05, 09, 0d, 01, 0e, 01, 01, 1b, 03, 02, 0b, 00, 18, 22, 01, 0c, 00, 19, 11, 00, 1a, 02, 0a, 0e, 02, 0a, 00, 0b, 22, 02, 0c, 00, 19, 15, 00, 1a, 00, 31, 1a, 00, 31, 00, 32, 22, 04, 0c, 00, 19, 05, 00, 1a, 00, 31, 09, 00, 31, 00, 32, 27, 01, 09, 00, 17, 0d, 02, 05, 01, 02]
|
Raw bytes (89): 0x[01, 01, 0a, 01, 27, 05, 09, 03, 0d, 22, 11, 03, 0d, 03, 0d, 22, 15, 03, 0d, 03, 0d, 05, 09, 0d, 01, 0d, 01, 01, 1b, 03, 02, 0b, 00, 18, 22, 01, 0c, 00, 19, 11, 00, 1a, 02, 0a, 0e, 02, 0a, 00, 0b, 22, 02, 0c, 00, 19, 15, 00, 1a, 00, 31, 1a, 00, 31, 00, 32, 22, 04, 0c, 00, 19, 05, 00, 1a, 00, 31, 09, 00, 31, 00, 32, 27, 01, 09, 00, 17, 0d, 02, 05, 01, 02]
|
||||||
Number of files: 1
|
Number of files: 1
|
||||||
- file 0 => global file 1
|
- file 0 => global file 1
|
||||||
Number of expressions: 10
|
Number of expressions: 10
|
||||||
@@ -14,7 +14,7 @@ Number of expressions: 10
|
|||||||
- expression 8 operands: lhs = Expression(0, Add), rhs = Counter(3)
|
- expression 8 operands: lhs = Expression(0, Add), rhs = Counter(3)
|
||||||
- expression 9 operands: lhs = Counter(1), rhs = Counter(2)
|
- expression 9 operands: lhs = Counter(1), rhs = Counter(2)
|
||||||
Number of file 0 mappings: 13
|
Number of file 0 mappings: 13
|
||||||
- Code(Counter(0)) at (prev + 14, 1) to (start + 1, 27)
|
- Code(Counter(0)) at (prev + 13, 1) to (start + 1, 27)
|
||||||
- Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 24)
|
- Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 24)
|
||||||
= (c0 + (c1 + c2))
|
= (c0 + (c1 + c2))
|
||||||
- Code(Expression(8, Sub)) at (prev + 1, 12) to (start + 0, 25)
|
- Code(Expression(8, Sub)) at (prev + 1, 12) to (start + 0, 25)
|
||||||
@@ -36,13 +36,13 @@ Number of file 0 mappings: 13
|
|||||||
- Code(Counter(3)) at (prev + 2, 5) to (start + 1, 2)
|
- Code(Counter(3)) at (prev + 2, 5) to (start + 1, 2)
|
||||||
|
|
||||||
Function name: abort::might_abort
|
Function name: abort::might_abort
|
||||||
Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 04, 01, 01, 14, 05, 02, 09, 01, 24, 02, 02, 0c, 03, 02]
|
Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 03, 01, 01, 14, 05, 02, 09, 01, 24, 02, 02, 0c, 03, 02]
|
||||||
Number of files: 1
|
Number of files: 1
|
||||||
- file 0 => global file 1
|
- file 0 => global file 1
|
||||||
Number of expressions: 1
|
Number of expressions: 1
|
||||||
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
|
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
|
||||||
Number of file 0 mappings: 3
|
Number of file 0 mappings: 3
|
||||||
- Code(Counter(0)) at (prev + 4, 1) to (start + 1, 20)
|
- Code(Counter(0)) at (prev + 3, 1) to (start + 1, 20)
|
||||||
- Code(Counter(1)) at (prev + 2, 9) to (start + 1, 36)
|
- Code(Counter(1)) at (prev + 2, 9) to (start + 1, 36)
|
||||||
- Code(Expression(0, Sub)) at (prev + 2, 12) to (start + 3, 2)
|
- Code(Expression(0, Sub)) at (prev + 2, 12) to (start + 3, 2)
|
||||||
= (c0 - c1)
|
= (c0 - c1)
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
LL| |#![feature(c_unwind)]
|
|
||||||
LL| |#![allow(unused_assignments)]
|
LL| |#![allow(unused_assignments)]
|
||||||
LL| |
|
LL| |
|
||||||
LL| 12|extern "C" fn might_abort(should_abort: bool) {
|
LL| 12|extern "C" fn might_abort(should_abort: bool) {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#![feature(c_unwind)]
|
|
||||||
#![allow(unused_assignments)]
|
#![allow(unused_assignments)]
|
||||||
|
|
||||||
extern "C" fn might_abort(should_abort: bool) {
|
extern "C" fn might_abort(should_abort: bool) {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// Tests that forced unwind through POF Rust frames wouldn't trigger our terminating guards.
|
// Tests that forced unwind through POF Rust frames wouldn't trigger our terminating guards.
|
||||||
|
|
||||||
#![feature(c_unwind)]
|
|
||||||
#![no_main]
|
#![no_main]
|
||||||
|
|
||||||
extern "C-unwind" {
|
extern "C-unwind" {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ impl Drop for Foo<'_> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" fn panicky() {
|
extern "C-unwind" fn panicky() {
|
||||||
resume_unwind(Box::new(()));
|
resume_unwind(Box::new(()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#![feature(c_unwind, const_extern_fn)]
|
#![feature(const_extern_fn)]
|
||||||
|
|
||||||
const extern "C" fn foo() {
|
const extern "C" fn foo() {
|
||||||
panic!() //~ ERROR evaluation of constant value failed
|
panic!() //~ ERROR evaluation of constant value failed
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
#![feature(c_unwind, const_extern_fn)]
|
#![feature(const_extern_fn)]
|
||||||
|
|
||||||
// We don't unwind in const-eval anyways.
|
// We don't unwind in const-eval anyways.
|
||||||
const extern "C" fn foo() {
|
const extern "C" fn foo() {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
//@[next] compile-flags: -Znext-solver
|
//@[next] compile-flags: -Znext-solver
|
||||||
|
|
||||||
#![allow(unused_must_use)]
|
#![allow(unused_must_use)]
|
||||||
#![feature(c_unwind)]
|
|
||||||
#![feature(panic_always_abort)]
|
#![feature(panic_always_abort)]
|
||||||
// Since we mark some ABIs as "nounwind" to LLVM, we must make sure that
|
// Since we mark some ABIs as "nounwind" to LLVM, we must make sure that
|
||||||
// we never unwind through them.
|
// we never unwind through them.
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
//@ normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
|
//@ normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
|
||||||
//@ needs-unwind
|
//@ needs-unwind
|
||||||
//@ ignore-emscripten "RuntimeError" junk in output
|
//@ ignore-emscripten "RuntimeError" junk in output
|
||||||
#![feature(c_unwind)]
|
|
||||||
|
|
||||||
extern "C" fn panic_in_ffi() {
|
extern "C" fn panic_in_ffi() {
|
||||||
panic!("Test");
|
panic!("Test");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
thread 'main' panicked at $DIR/panic-in-ffi.rs:13:5:
|
thread 'main' panicked at $DIR/panic-in-ffi.rs:12:5:
|
||||||
Test
|
Test
|
||||||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
||||||
thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
|
thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
//@ ignore-test
|
|
||||||
|
|
||||||
// After partial stabilisation, `c_unwind` only contains codegen behaviour changes
|
|
||||||
// and are tested in `src/test/codegen/unwind-abis`
|
|
||||||
Reference in New Issue
Block a user