3 #![feature(core_intrinsics)]
5 #![crate_type = "rlib"]
11 pub type Bar = &'static Fn();
12 pub type Quux = [u8; 100];
14 pub unsafe fn test_bool_load(p: &mut bool, v: bool) {
15 intrinsics::atomic_load(p);
16 //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `bool`
19 pub unsafe fn test_bool_store(p: &mut bool, v: bool) {
20 intrinsics::atomic_store(p, v);
21 //~^ ERROR `atomic_store` intrinsic: expected basic integer type, found `bool`
24 pub unsafe fn test_bool_xchg(p: &mut bool, v: bool) {
25 intrinsics::atomic_xchg(p, v);
26 //~^ ERROR `atomic_xchg` intrinsic: expected basic integer type, found `bool`
29 pub unsafe fn test_bool_cxchg(p: &mut bool, v: bool) {
30 intrinsics::atomic_cxchg(p, v, v);
31 //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer type, found `bool`
34 pub unsafe fn test_Foo_load(p: &mut Foo, v: Foo) {
35 intrinsics::atomic_load(p);
36 //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `Foo`
39 pub unsafe fn test_Foo_store(p: &mut Foo, v: Foo) {
40 intrinsics::atomic_store(p, v);
41 //~^ ERROR `atomic_store` intrinsic: expected basic integer type, found `Foo`
44 pub unsafe fn test_Foo_xchg(p: &mut Foo, v: Foo) {
45 intrinsics::atomic_xchg(p, v);
46 //~^ ERROR `atomic_xchg` intrinsic: expected basic integer type, found `Foo`
49 pub unsafe fn test_Foo_cxchg(p: &mut Foo, v: Foo) {
50 intrinsics::atomic_cxchg(p, v, v);
51 //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer type, found `Foo`
54 pub unsafe fn test_Bar_load(p: &mut Bar, v: Bar) {
55 intrinsics::atomic_load(p);
56 //~^ ERROR expected basic integer type, found `&dyn Fn()`
59 pub unsafe fn test_Bar_store(p: &mut Bar, v: Bar) {
60 intrinsics::atomic_store(p, v);
61 //~^ ERROR expected basic integer type, found `&dyn Fn()`
64 pub unsafe fn test_Bar_xchg(p: &mut Bar, v: Bar) {
65 intrinsics::atomic_xchg(p, v);
66 //~^ ERROR expected basic integer type, found `&dyn Fn()`
69 pub unsafe fn test_Bar_cxchg(p: &mut Bar, v: Bar) {
70 intrinsics::atomic_cxchg(p, v, v);
71 //~^ ERROR expected basic integer type, found `&dyn Fn()`
74 pub unsafe fn test_Quux_load(p: &mut Quux, v: Quux) {
75 intrinsics::atomic_load(p);
76 //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `[u8; 100]`
79 pub unsafe fn test_Quux_store(p: &mut Quux, v: Quux) {
80 intrinsics::atomic_store(p, v);
81 //~^ ERROR `atomic_store` intrinsic: expected basic integer type, found `[u8; 100]`
84 pub unsafe fn test_Quux_xchg(p: &mut Quux, v: Quux) {
85 intrinsics::atomic_xchg(p, v);
86 //~^ ERROR `atomic_xchg` intrinsic: expected basic integer type, found `[u8; 100]`
89 pub unsafe fn test_Quux_cxchg(p: &mut Quux, v: Quux) {
90 intrinsics::atomic_cxchg(p, v, v);
91 //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer type, found `[u8; 100]`