[PATCH][4.1/4.2] Fix PR27260, fallout of fix for PR27095

Richard Guenther richard.guenther@gmail.com
Fri Apr 28 09:23:00 GMT 2006


On 4/28/06, Alan Modra <amodra@bigpond.net.au> wrote:
> On Thu, Apr 27, 2006 at 06:43:33AM -0600, Roger Sayle wrote:
> > On Thu, 27 Apr 2006, Alan Modra wrote:
> > >
> > >     PR middle-end/27260
> > >     * builtins.c (expand_builtin_memset): Expand val in original mode.
> > >
> > > OK to apply?
> >
> > This is OK for mainline (and 4.1 after a week) provided that you add
> > suitable test cases as requested by Richard G.  Thanks.
>
> The testcase for pr27095 proved a little tricky.  The one Richard
> Guenther posted didn't fail on an unpatched compiler.  Apparently we
> need a builtin strlen in the memset arg;  my_strlen doesn't trigger the
> bug.

Hmm, it failed for me (with 4.1.0) - the key was that my_strlen needs to be
const or pure so TER places it in the argument list.

Richard.



More information about the Gcc-patches mailing list