This is the mail archive of the gcc@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: Infinite recursion due to builtin pattern detection


> -----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

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