+2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
+
+ PR java/18091:
+ * jcf-write.c (perform_relocations): Don't call memcpy if source
+ and destination are the same.
+
2005-01-17 Tom Tromey <tromey@redhat.com>
* verify-impl.c (get_short): Sign extend.
/* Write out a Java(TM) class file.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GCC.
int n = (old_ptr - old_buffer) - start;
new_ptr -= n;
old_ptr -= n;
- if (n > 0)
+ /* Don't "copy" bytes in place, this causes valgrind
+ warnings. */
+ if (n > 0 && new_ptr != old_ptr)
memcpy (new_ptr, old_ptr, n);
if (old_ptr == old_buffer)
break;