This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] More aggressive __builtin_memcpy optimizations (PR middle-end/29215)


On Thu, 20 Nov 2008 16:54:53 +0100, Jakub Jelinek wrote:
 > 2008-11-20  Jakub Jelinek  <jakub@redhat.com>
 > 
 > 	PR middle-end/29215
 > 	* builtins.c (fold_builtin_memory_op): Remove
 > 	is_gimple_min_invariant and readonly_data_expr src check.
...

This patch, r142061, caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46483

__builtin_memcpy() to an unaligned int in a packed struct now generates
a single int-sized store, which triggers an alignment exception at runtime
on affected archs (including at least ARM and SPARC).  This was fixed
recently on trunk by Richard's r163189, but 4.4 and 4.5 remain broken.

A plain assignment generates correct code.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]