1 #![feature(core_intrinsics)]
3 #![crate_type = "rlib"]
9 pub type Bar = &'static Fn();
10 pub type Quux = [u8; 100];
12 pub unsafe fn test_bool_load(p: &mut bool, v: bool) {
13 intrinsics::atomic_load(p);
14 //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `bool`
17 pub unsafe fn test_bool_store(p: &mut bool, v: bool) {
18 intrinsics::atomic_store(p, v);
19 //~^ ERROR `atomic_store` intrinsic: expected basic integer type, found `bool`
22 pub unsafe fn test_bool_xchg(p: &mut bool, v: bool) {
23 intrinsics::atomic_xchg(p, v);
24 //~^ ERROR `atomic_xchg` intrinsic: expected basic integer type, found `bool`
27 pub unsafe fn test_bool_cxchg(p: &mut bool, v: bool) {
28 intrinsics::atomic_cxchg(p, v, v);
29 //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer type, found `bool`
32 pub unsafe fn test_Foo_load(p: &mut Foo, v: Foo) {
33 intrinsics::atomic_load(p);
34 //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `Foo`
37 pub unsafe fn test_Foo_store(p: &mut Foo, v: Foo) {
38 intrinsics::atomic_store(p, v);
39 //~^ ERROR `atomic_store` intrinsic: expected basic integer type, found `Foo`
42 pub unsafe fn test_Foo_xchg(p: &mut Foo, v: Foo) {
43 intrinsics::atomic_xchg(p, v);
44 //~^ ERROR `atomic_xchg` intrinsic: expected basic integer type, found `Foo`
47 pub unsafe fn test_Foo_cxchg(p: &mut Foo, v: Foo) {
48 intrinsics::atomic_cxchg(p, v, v);
49 //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer type, found `Foo`
52 pub unsafe fn test_Bar_load(p: &mut Bar, v: Bar) {
53 intrinsics::atomic_load(p);
54 //~^ ERROR expected basic integer type, found `&dyn std::ops::Fn()`
57 pub unsafe fn test_Bar_store(p: &mut Bar, v: Bar) {
58 intrinsics::atomic_store(p, v);
59 //~^ ERROR expected basic integer type, found `&dyn std::ops::Fn()`
62 pub unsafe fn test_Bar_xchg(p: &mut Bar, v: Bar) {
63 intrinsics::atomic_xchg(p, v);
64 //~^ ERROR expected basic integer type, found `&dyn std::ops::Fn()`
67 pub unsafe fn test_Bar_cxchg(p: &mut Bar, v: Bar) {
68 intrinsics::atomic_cxchg(p, v, v);
69 //~^ ERROR expected basic integer type, found `&dyn std::ops::Fn()`
72 pub unsafe fn test_Quux_load(p: &mut Quux, v: Quux) {
73 intrinsics::atomic_load(p);
74 //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `[u8; 100]`
77 pub unsafe fn test_Quux_store(p: &mut Quux, v: Quux) {
78 intrinsics::atomic_store(p, v);
79 //~^ ERROR `atomic_store` intrinsic: expected basic integer type, found `[u8; 100]`
82 pub unsafe fn test_Quux_xchg(p: &mut Quux, v: Quux) {
83 intrinsics::atomic_xchg(p, v);
84 //~^ ERROR `atomic_xchg` intrinsic: expected basic integer type, found `[u8; 100]`
87 pub unsafe fn test_Quux_cxchg(p: &mut Quux, v: Quux) {
88 intrinsics::atomic_cxchg(p, v, v);
89 //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer type, found `[u8; 100]`