summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/builtins.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/gcc/builtins.c b/contrib/gcc/builtins.c
index 7eb878f7..22e66b6 100644
--- a/contrib/gcc/builtins.c
+++ b/contrib/gcc/builtins.c
@@ -19,6 +19,8 @@ along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+/* $FreeBSD$ */
+
#include "config.h"
#include "system.h"
#include "machmode.h"
@@ -2194,6 +2196,11 @@ expand_builtin_memset (exp, target, mode)
len_rtx = expand_expr (len, NULL_RTX, VOIDmode, 0);
+ /* Give up for non-constant lengths. They are broken on at least
+ i386's. */
+ if (GET_CODE (len_rtx) != CONST_INT)
+ return 0;
+
dest_mem = get_memory_rtx (dest);
set_mem_align (dest_mem, dest_align);
dest_addr = clear_storage (dest_mem, len_rtx);
OpenPOWER on IntegriCloud