Hi all,<br><br>If I remove datalayout definition, code is not optimized and work as expected.<br>So my question is:<br><br><font><font>What attribute/value/interpretation of data-layout would cause this type of bug?  </font></font><br>
Thanks for your answers<br>Seb<br><br><div class="gmail_quote">2012/2/28 Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>></span><br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 28/02/12 17:48, John Regehr wrote:<br>
>> void t2(double *x)<br>
>> {<br>
>>       long long a[2];<br>
>>       a[0] = 3;<br>
>>       a[1] = 5;<br>
>>       *x = * ((double *) a);<br>
>>       *(x+1) = * ((double *) &a[a[0]-2]);<br>
>> }<br>
><br>
> Doesn't this code violate the strict aliasing rules?<br>
<br>
</div></div>Maybe, but the LLVM IR he showed seems perfectly well defined.<br>
<br>
Ciao, Duncan.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br>