<div dir="ltr"><br><div>Hi All,</div><div><br></div><div>clang -v </div><div><br></div><div>clang version 3.5.0 (204017)<br></div>
<p class="">Target: x86_64-apple-darwin13.1.0</p>
<div>Thread model: posix</div><div><br></div><div>This is with respect to the following tc from gcc test suite:<br></div><div><br></div><div>







<p class="">#include <stdarg.h></p>
<p class=""><br></p>
<p class="">extern void exit (int);</p>
<p class="">extern void abort (void);</p>
<p class=""><br></p>
<p class="">int a[10];</p>
<p class="">int i = 9;</p>
<p class=""><br></p>
<p class="">void</p>
<p class="">f (int n, ...)</p>
<p class="">{</p>
<p class="">  va_list ap;</p>
<p class="">  void *p;</p>
<p class="">  va_start (ap, n);</p>
<p class="">  p = va_arg (ap, typeof (int (*)[++i]));</p>
<p class="">  if (p != a)</p>
<p class="">    abort ();</p>
<p class="">  if (i != n)</p>
<p class="">    abort ();</p>
<p class="">  va_end (ap);</p>
<p class="">}</p>
<p class=""><br></p>
<p class="">int</p>
<p class="">main (void)</p>
<p class="">{</p>
<p class="">  f (10, &a);</p>
<p class="">  exit (0);</p>
<p class="">}</p><p class=""><br></p><p class="">clang fails to emit code for increment operation done in the call to va_arg.</p><p class="">I have attached a patch which fixes the same.</p><p class="">Please if someone could help in reviewing it.</p>

<p class=""><br></p><p class="">Also it would be great if someone could help/redirect me, as to what is the format </p><p class="">used by to add regression test cases testing runtime behaviour of a tc?</p><p class=""><br>

</p><p class="">Thanks,</p><p class="">Rahul</p></div></div>