aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2023-08-20 23:27:34 +0100
committerGaius Mulley <gaiusmod2@gmail.com>2023-08-20 23:27:34 +0100
commita724c6e93dfce3a86f9c0fbf8be4316c37dd5a40 (patch)
treebecfec0c40a4e05bb3a33161d4ac9d66cc47e90a
parent6d33602650612c89e7e32201266763b167f62a46 (diff)
downloadgcc-a724c6e93dfce3a86f9c0fbf8be4316c37dd5a40.zip
gcc-a724c6e93dfce3a86f9c0fbf8be4316c37dd5a40.tar.gz
gcc-a724c6e93dfce3a86f9c0fbf8be4316c37dd5a40.tar.bz2
PR modula2/111085 nexttoward and nexttowardf contain incorrect definitions
The definition for procedures nexttoward and nexttowardf contain second incorrect parameter and return types. This bug was discovered when attempting to resolve PR 108143 and is applied separately and prior to PR 108143. gcc/m2/ChangeLog: PR modula2/111085 * gm2-libs/Builtins.def (nexttoward): Alter the second parameter to LONGREAL. (nexttowardf): Alter the second parameter to LONGREAL. * gm2-libs/Builtins.mod (nexttoward): Alter the second parameter to LONGREAL. (nexttowardf): Alter the second parameter to LONGREAL. * gm2-libs/cbuiltin.def (nexttoward): Alter the second parameter to LONGREAL. (nexttowardf): Alter the second parameter to LONGREAL. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
-rw-r--r--gcc/m2/gm2-libs/Builtins.def4
-rw-r--r--gcc/m2/gm2-libs/Builtins.mod4
-rw-r--r--gcc/m2/gm2-libs/cbuiltin.def4
3 files changed, 6 insertions, 6 deletions
diff --git a/gcc/m2/gm2-libs/Builtins.def b/gcc/m2/gm2-libs/Builtins.def
index eda36c3..651ade58 100644
--- a/gcc/m2/gm2-libs/Builtins.def
+++ b/gcc/m2/gm2-libs/Builtins.def
@@ -91,8 +91,8 @@ PROCEDURE __BUILTIN__ nextafter (x, y: REAL) : REAL ;
PROCEDURE __BUILTIN__ nextafterf (x, y: SHORTREAL) : SHORTREAL ;
PROCEDURE __BUILTIN__ nextafterl (x, y: LONGREAL) : LONGREAL ;
-PROCEDURE __BUILTIN__ nexttoward (x, y: REAL) : LONGREAL ;
-PROCEDURE __BUILTIN__ nexttowardf (x, y: SHORTREAL) : LONGREAL ;
+PROCEDURE __BUILTIN__ nexttoward (x: REAL; y: LONGREAL) : REAL ;
+PROCEDURE __BUILTIN__ nexttowardf (x: SHORTREAL; y: LONGREAL) : SHORTREAL ;
PROCEDURE __BUILTIN__ nexttowardl (x, y: LONGREAL) : LONGREAL ;
PROCEDURE __BUILTIN__ scalbln (x: REAL; n: LONGINT) : REAL ;
diff --git a/gcc/m2/gm2-libs/Builtins.mod b/gcc/m2/gm2-libs/Builtins.mod
index 963e88e..70c1f8a 100644
--- a/gcc/m2/gm2-libs/Builtins.mod
+++ b/gcc/m2/gm2-libs/Builtins.mod
@@ -267,12 +267,12 @@ BEGIN
RETURN cbuiltin.nextafterl (x, y)
END nextafterl ;
-PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_nexttoward)) nexttoward (x, y: REAL) : LONGREAL ;
+PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_nexttoward)) nexttoward (x: REAL; y: LONGREAL) : REAL ;
BEGIN
RETURN cbuiltin.nexttoward (x, y)
END nexttoward ;
-PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_nexttowardf)) nexttowardf (x, y: SHORTREAL) : LONGREAL ;
+PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_nexttowardf)) nexttowardf (x: SHORTREAL; y: LONGREAL) : SHORTREAL ;
BEGIN
RETURN cbuiltin.nexttowardf (x, y)
END nexttowardf ;
diff --git a/gcc/m2/gm2-libs/cbuiltin.def b/gcc/m2/gm2-libs/cbuiltin.def
index 9992705..64d0a79 100644
--- a/gcc/m2/gm2-libs/cbuiltin.def
+++ b/gcc/m2/gm2-libs/cbuiltin.def
@@ -118,8 +118,8 @@ PROCEDURE nextafter (x, y: REAL) : REAL ;
PROCEDURE nextafterf (x, y: SHORTREAL) : SHORTREAL ;
PROCEDURE nextafterl (x, y: LONGREAL) : LONGREAL ;
-PROCEDURE nexttoward (x, y: REAL) : REAL ;
-PROCEDURE nexttowardf (x, y: SHORTREAL) : SHORTREAL ;
+PROCEDURE nexttoward (x: REAL; y: LONGREAL) : REAL ;
+PROCEDURE nexttowardf (x: SHORTREAL; y: LONGREAL) : SHORTREAL ;
PROCEDURE nexttowardl (x, y: LONGREAL) : LONGREAL ;
PROCEDURE scalb (x, n: REAL) : REAL ;