]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: fix powif64 intrinsic
authorMarc Poulhiès <dkm@kataplop.net>
Mon, 19 Feb 2024 21:36:39 +0000 (22:36 +0100)
committerCohenArthur <arthur.cohen@embecosm.com>
Tue, 20 Feb 2024 10:37:54 +0000 (10:37 +0000)
The signature was incorrectly using an i64 for the integer power,
instead of an i32.

gcc/testsuite/ChangeLog:

* rust/compile/torture/intrinsics-math.rs: Adjust powif64
intrinsic signature.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
gcc/testsuite/rust/compile/torture/intrinsics-math.rs

index ab394e92e21c5339cbd0e862dede87348e646cfb..e0d15f99d48243a6a3d30100bbbd4d6ae2a62bd3 100644 (file)
@@ -15,7 +15,7 @@ extern "rust-intrinsic" {
     pub fn powf64(a: f64, x: f64) -> f64;
 
     pub fn powif32(a: f32, x: i32) -> f32;
-    pub fn powif64(a: f64, x: i64) -> f64;
+    pub fn powif64(a: f64, x: i32) -> f64;
 
     pub fn expf32(x: f32) -> f32;
     pub fn expf64(x: f64) -> f64;
@@ -93,7 +93,7 @@ fn main() {
 
         f32 = powif32(7f32, 8i32);
         // { dg-final { scan-tree-dump-times {(?n)f32 .* __builtin_powi. \(.*7\.0e\+0, .*8\);$} 1 original } }
-        f64 = powif64(9f64, 10i64);
+        f64 = powif64(9f64, 10i32);
         // { dg-final { scan-tree-dump-times {(?n)f64 .* __builtin_powi.? \(.*9\.0e\+0, .*10\);$} 1 original } }
 
         f32 = expf32(11f32);