[gfortran] Fix __builtin_memcpy

Paul Brook paul@codesourcery.com
Sat Feb 14 20:05:00 GMT 2004


Patch below corrects the function type for __builtin_memcpy.

Paul

2004-02-14  Paul Brook  <paul@codesourcery.com>

	* f95-lang.c (gfc_init_builtin_functions): Build chain properly.

Index: f95-lang.c
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/fortran/Attic/f95-lang.c,v
retrieving revision 1.1.2.16
diff -u -p -r1.1.2.16 f95-lang.c
--- a/f95-lang.c	5 Dec 2003 09:16:09 -0000	1.1.2.16
+++ b/f95-lang.c	14 Feb 2004 19:12:30 -0000
@@ -818,8 +818,8 @@ gfc_init_builtin_functions (void)
 		      "__builtin_expect", true);
 
   tmp = tree_cons (NULL_TREE, size_type_node, voidchain);
-  tmp = tree_cons (NULL_TREE, pvoid_type_node, voidchain);
-  tmp = tree_cons (NULL_TREE, pvoid_type_node, voidchain);
+  tmp = tree_cons (NULL_TREE, pvoid_type_node, tmp);
+  tmp = tree_cons (NULL_TREE, pvoid_type_node, tmp);
   ftype = build_function_type (pvoid_type_node, tmp);
   gfc_define_builtin ("__builtin_memcpy", ftype, BUILT_IN_MEMCPY,
 		      "memcpy", false);



More information about the Gcc-patches mailing list