This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Infinite recursion due to builtin pattern detection
- From: "Paulo Matos" <pmatos at broadcom dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 27 Jun 2013 14:20:13 +0000
- Subject: RE: Infinite recursion due to builtin pattern detection
- References: <19EB96622A777C4AB91610E763265F4622D748 at SJEXCHMB14 dot corp dot ad dot broadcom dot com> <19EB96622A777C4AB91610E763265F4622D766 at SJEXCHMB14 dot corp dot ad dot broadcom dot com>
> -----Original Message-----
> From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On Behalf Of Paulo
> Matos
> Sent: 27 June 2013 15:02
> To: gcc@gcc.gnu.org
> Subject: RE: Infinite recursion due to builtin pattern detection
>
>
> Let me add that one of the replies to this last issue would be that GCC
> detects the infinite recursive call and removes everything else afterwards to
> the test involving internal_main disappears but that's not the case. The test
> is removed in vrp1 and the memset pattern is only replaced by a call to the
> builtin in ldist.
>
> Paulo Matos
Chris Groessler just pointed out to me in private that I missed the fact that n is unsigned so it'll wrap.
That explains why GCC removes the condition but the main issue of the memset recursion still stands.
Paulo Matos