This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/27095] [4.1/4.2 Regression] O2 produces duplicate code
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Apr 2006 09:00:29 -0000
- Subject: [Bug middle-end/27095] [4.1/4.2 Regression] O2 produces duplicate code
- References: <bug-27095-9544@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2006-04-10 09:00 -------
We go via expand_builtin_memset which expands strlen at
len_rtx = expand_normal (len);
but then, expand via setmem fails, so we bail out
else if (!set_storage_via_setmem(dest_mem, len_rtx, val_rtx,
dest_align))
return 0;
and end up doing regular
return expand_call (exp, target, ignore);
which then expands strlen again.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27095