]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
The parameters for functions from the frexp and scalbn families were the wrong way...
authorDuncan Sands <baldrick@free.fr>
Tue, 5 Apr 2011 10:59:38 +0000 (12:59 +0200)
committerDuncan Sands <baldrick@gcc.gnu.org>
Tue, 5 Apr 2011 10:59:38 +0000 (10:59 +0000)
The parameters for functions from the frexp and scalbn families
were the wrong way round.  Swap them.

From-SVN: r171979

gcc/fortran/ChangeLog
gcc/fortran/f95-lang.c

index ec23216ae08d53de727bfd81e44e043de0981787..2ebd1b4b9991e8392952d85b63f0976ae473ee24 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-05  Duncan Sands  <baldrick@free.fr>
+
+       * f95-lang.c (build_builtin_fntypes): Swap frexp and scalbn parameter
+       types.
+
 2011-03-13  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/47348
index 9fddaf77db19f396268a282a9a698f7fbc3dadc1..cce07cb668900fd8bfba6cf0ae69911260db25ba 100644 (file)
@@ -646,19 +646,20 @@ build_builtin_fntypes (tree *fntype, tree type)
   /* type (*) (type, type) */
   tmp = tree_cons (NULL_TREE, type, tmp);
   fntype[1] = build_function_type (type, tmp);
-  /* type (*) (int, type) */
+  /* type (*) (type, int) */
   tmp = tree_cons (NULL_TREE, integer_type_node, void_list_node);
   tmp = tree_cons (NULL_TREE, type, tmp);
   fntype[2] = build_function_type (type, tmp);
   /* type (*) (void) */
   fntype[3] = build_function_type (type, void_list_node);
   /* type (*) (type, &int) */
-  tmp = tree_cons (NULL_TREE, type, void_list_node);
-  tmp = tree_cons (NULL_TREE, build_pointer_type (integer_type_node), tmp);
+  tmp = tree_cons (NULL_TREE, build_pointer_type (integer_type_node),
+                   void_list_node);
+  tmp = tree_cons (NULL_TREE, type, tmp);
   fntype[4] = build_function_type (type, tmp);
   /* type (*) (type, int) */
-  tmp = tree_cons (NULL_TREE, type, void_list_node);
-  tmp = tree_cons (NULL_TREE, integer_type_node, tmp);
+  tmp = tree_cons (NULL_TREE, integer_type_node, void_list_node);
+  tmp = tree_cons (NULL_TREE, type, tmp);
   fntype[5] = build_function_type (type, tmp);
 }