[cfe-dev] Possible clang bug with -O2, wrong if branch entered, in clang version 2.1 (tags/Apple/clang-163.7.1)

Jonathan Sauer jonathan.sauer at gmx.de
Tue Feb 21 08:09:22 PST 2012


Hello,

> Sorry, there was a problem with cut&paste of the gist URL, the correct one is:
> 
> https://gist.github.com/1876875
> 
> Salvatore
> 
> On Tue, Feb 21, 2012 at 3:45 PM, Salvatore Sanfilippo <antirez at gmail.com> wrote:
>> Hello,
>> 
>> today I tried to compile Redis with clang, and a test was failing
>> without apparent reasons.
>> I investigated a bit further, and isolated the bug in the following
>> code fragment:
>> 
>> https://gist.github.com/187687
>> 
>> I verified the bug only in Apple's clang, I'm not 100% sure this is
>> the right place where to submit such a bug report. If this is the
>> wrong place, I'm sorry, please point me in the right direction.

I can confirm the bug on x86_64-apple-darwin10.8.0 using clang r151042 with -O1, -O2, -O3 and -Os.

Bugs should be filed in LLVM's bugtracker. I took the liberty of doing it for you:
<http://llvm.org/bugs/show_bug.cgi?id=12051>


HTH,
Jonathan





More information about the cfe-dev mailing list