2025-01-27 18:18:13 +01:00
|
|
|
//! Ensure "forbidden" target features cannot be disabled via `-Ctarget-feature`.
|
|
|
|
//@ compile-flags: --target=riscv32e-unknown-none-elf --crate-type=lib
|
|
|
|
//@ needs-llvm-components: riscv
|
|
|
|
//@ compile-flags: -Ctarget-feature=-forced-atomics
|
2024-09-02 11:45:59 +02:00
|
|
|
// For now this is just a warning.
|
|
|
|
//@ build-pass
|
2025-04-12 22:40:34 +03:00
|
|
|
|
2024-09-02 11:45:59 +02:00
|
|
|
#![feature(no_core, lang_items)]
|
|
|
|
#![no_core]
|
|
|
|
|
|
|
|
#[lang = "sized"]
|
|
|
|
pub trait Sized {}
|
2025-03-29 02:41:32 +03:00
|
|
|
|
|
|
|
//~? WARN target feature `forced-atomics` cannot be disabled with `-Ctarget-feature`: unsound because it changes the ABI of atomic operations
|