2022-01-31 13:04:27 +00:00
|
|
|
// build-fail
|
2021-07-23 13:19:22 +00:00
|
|
|
// compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu
|
|
|
|
// needs-llvm-components: aarch64
|
|
|
|
#![feature(no_core, lang_items)]
|
|
|
|
#![no_core]
|
|
|
|
|
|
|
|
#[lang="sized"]
|
|
|
|
trait Sized {}
|
2022-01-31 13:04:27 +00:00
|
|
|
|
2021-07-23 13:19:22 +00:00
|
|
|
// FIXME: this should not need to be public.
|
|
|
|
pub fn main() {
|
2022-01-31 13:04:27 +00:00
|
|
|
#[target_feature(enable = "pacg")]
|
|
|
|
//~^ ERROR must all be either enabled or disabled together
|
|
|
|
unsafe fn inner() {}
|
|
|
|
|
|
|
|
unsafe {
|
|
|
|
foo();
|
|
|
|
bar();
|
|
|
|
baz();
|
|
|
|
inner();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[target_feature(enable = "paca")]
|
|
|
|
//~^ ERROR must all be either enabled or disabled together
|
|
|
|
unsafe fn foo() {}
|
|
|
|
|
|
|
|
|
|
|
|
#[target_feature(enable = "paca,pacg")]
|
|
|
|
unsafe fn bar() {}
|
|
|
|
|
|
|
|
#[target_feature(enable = "paca")]
|
|
|
|
#[target_feature(enable = "pacg")]
|
|
|
|
unsafe fn baz() {}
|