I don't know if we're planning on another patch release for 3.8, but I've already asked our patch release manager to put this into 3.9.1.<div class="gmail_extra"><br><div class="gmail_quote">On 17 Sep 2016 8:29 am, "Fletcher, John P" <<a href="mailto:j.p.fletcher@aston.ac.uk">j.p.fletcher@aston.ac.uk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Richard<br>
<br>
I see the same faulty output with Clang 3.6.0 and 3.8.0.<br>
<br>
Is there anything which should be done about this pending an updated release?<br>
<br>
Thanks<br>
<br>
John<br>
<br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font color="#000000" size="2" face="Tahoma"><b>From:</b> cfe-dev [<a href="mailto:cfe-dev-bounces@lists.llvm.org" target="_blank">cfe-dev-bounces@lists.llvm.<wbr>org</a>] on behalf of Richard Smith via cfe-dev [<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>]<br>
<b>Sent:</b> 17 September 2016 00:39<br>
<b>To:</b> Andrew Johnson<br>
<b>Cc:</b> Clang Dev<br>
<b>Subject:</b> Re: [cfe-dev] switch over constant results in strange constructor/destructor ordering<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Thanks for letting us know, fixed in r281797.</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Sep 16, 2016 at 2:13 PM, 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 dir="ltr">Wow, yes, that's a (pretty scary) wrong-code bug. Working on it...<br>
<div class="gmail_extra"><br>
<div class="gmail_quote">
<div>
<div>On Fri, Sep 16, 2016 at 6:47 AM, Andrew Johnson via cfe-dev <span dir="ltr">
<<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br>
</div>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div>
<div dir="ltr">
<div><font face="monospace, monospace">Hello,</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">I'm seeing an unexpected construction/destruction order in the program below with clang 3.9.0. Is this considered a bug? </font><span style="font-family:monospace,monospace">Thank you.</span></div>
<font face="monospace, monospace">
<div><br>
</div>
<div>
<div>clang asm - <a href="https://godbolt.org/g/uGlpFa" target="_blank">https://godbolt.org/g/uGlpFa</a><br>
</div>
gcc asm - <a href="https://godbolt.org/g/WDgcZP" target="_blank">https://godbolt.org/g/WDgcZP</a><br>
</div>
<div><br>
</div>
</font>
<div><font face="monospace, monospace">printf Output from clang (Unexpected):</font></div>
<div>
<div><font face="monospace, monospace">obj entered 0</font></div>
<div><font face="monospace, monospace">obj entered 1</font></div>
<div><font face="monospace, monospace">obj entered 2</font></div>
<div><font face="monospace, monospace">obj exited 2</font></div>
<div><font face="monospace, monospace">obj exited 1</font></div>
<div><font face="monospace, monospace">obj exited 0</font></div>
</div>
<div><br>
</div>
<div><span style="font-family:monospace,monospace">printf Output from gcc (Expected):</span></div>
<div>
<div><font face="monospace, monospace">obj entered 0</font></div>
<div><font face="monospace, monospace">obj exited 0</font></div>
<div><font face="monospace, monospace">obj entered 1</font></div>
<div><font face="monospace, monospace">obj exited 1</font></div>
<div><font face="monospace, monospace">obj entered 2</font></div>
<div><font face="monospace, monospace">obj exited 2</font></div>
<div style="font-family:monospace,monospace"><br>
</div>
</div>
<div style="font-family:monospace,monospace"><br>
</div>
<div style="font-family:monospace,monospace">Program:</div>
<div style="font-family:monospace,monospace"><br>
</div>
<div><span style="font-family:monospace,monospace">#include <stdint.h></span><br>
</div>
<div>
<div>
<div><font face="monospace, monospace">#include <stdio.h></font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">class SomeClass</font></div>
<div><font face="monospace, monospace">{</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>uint32_t k;</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>public:</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>SomeClass(uint32_t x)</font></div>
<div><font face="monospace, monospace"> { k = x; printf("obj entered %d\n", k); }</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>~SomeClass()</font></div>
<div><font face="monospace, monospace"> { printf("obj exited %d\n", k); }</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">};</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">int main()</font></div>
<div><font face="monospace, monospace">{</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>uint32_t ii = 0;</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>switch(1)</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>{</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>default:</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>{</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>{</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>SomeClass someClass(ii++);</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>}</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>{</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>SomeClass someClass2(ii++);</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>}</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>{</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>SomeClass someClass3(ii++);</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>}</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>}</font></div>
<div><font face="monospace, monospace"><span style="white-space:pre-wrap"></span>}</font></div>
<div><font face="monospace, monospace">}</font></div>
</div>
<div><br>
</div>
</div>
</div>
<br>
</div>
</div>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</blockquote></div></div>