]> git.lizzy.rs Git - rust.git/blob - tests/codegen/issue-32031.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / codegen / issue-32031.rs
1 // compile-flags: -C no-prepopulate-passes -Copt-level=0
2
3 #![crate_type = "lib"]
4
5 #[no_mangle]
6 pub struct F32(f32);
7
8 // CHECK: define{{.*}}float @add_newtype_f32(float %a, float %b)
9 #[inline(never)]
10 #[no_mangle]
11 pub fn add_newtype_f32(a: F32, b: F32) -> F32 {
12     F32(a.0 + b.0)
13 }
14
15 #[no_mangle]
16 pub struct F64(f64);
17
18 // CHECK: define{{.*}}double @add_newtype_f64(double %a, double %b)
19 #[inline(never)]
20 #[no_mangle]
21 pub fn add_newtype_f64(a: F64, b: F64) -> F64 {
22     F64(a.0 + b.0)
23 }