<div class="gmail_quote">On Fri, Mar 30, 2012 at 12:33 PM, Matthieu Monrocq <span dir="ltr"><<a href="mailto:matthieu.monrocq@gmail.com">matthieu.monrocq@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote">Le 30 mars 2012 20:41, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> a écrit :<div><div class="h5"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="gmail_quote"><div>On Fri, Mar 30, 2012 at 1:06 AM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>Repro looks like this:</div><div><br></div>extern "C" {<div>  void f() { static int n = 1; }</div><div>  void g() { static long long n = 2; }</div><div>}</div><div><br></div><div>The root cause seems to be that we don't mangle static locals inside an extern "C" block. (For reference, g++ does.)</div>


</blockquote><div><br></div></div><div>This is causing pretty significant regressions for us. Is a fix in the works? If not, I'd like to revert until we get a fix in place so that we can make forward progress, and track down other bugs currently showing up.</div>


</div>
<br><br></blockquote></div></div><div><br>It has been reported on the mainling list that:<br><br>int main(int argc, char*[]) {<br>  switch(argc) {<br>  case 0: { const int s[] = {0}; break; }<br>  case 1: { const int s[] = {1, 2}; break; }<br>

  }<br>  return 0;<br>}<br><br>was now broken, could it be due to this too ?</div></div></blockquote><div><br></div><div>Yes, this is the same issue. We're merging the globals which are implicitly created to hold the constant values of the 's' variables.<br>
</div></div>