diff --git a/gcc/m2/gm2-libs/Builtins.def b/gcc/m2/gm2-libs/Builtins.def
index eda36c3cfce7a9a9e05e9be8f98eb299e86c9603..651ade580cb09b3c5efc087fa995ebace02b7023 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 963e88ec461f8d07cd57bea86248e9603b4d503b..70c1f8a3e1fa274b281cfb766d4b0fd71b71410e 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 99927058bc6c18ea62dcb3447ed86c04fdd83c79..64d0a79fb5091954fd83702f1802168d95a81fcd 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 ;