Originally reported in https://github.com/EmbarkStudios/rust-gpu/issues/361#issuecomment-753329276 ```rust #[test] fn struct_f32_return() { val(r#" #[derive(Copy, Clone)] #[repr(C)] pub struct S { x: f32, } fn f() -> S { S { x: 2.0 } } #[allow(unused_attributes)] #[spirv(fragment)] pub fn main() { f(); } "#); } ``` ``` error: Cannot cast between pointer types --> src/lib.rs:14:29 | 14 | fn f() -> S { S { x: 2.0 } } | ^ | = note: from: *{Function} struct S { x: f32 } = note: to: *{Function} u32 error: Cannot cast between pointer types --> src/lib.rs:18:5 | 18 | f(); | ^^^ | = note: from: *{Function} struct S { x: f32 } = note: to: *{Function} u32 ```