<HTML><HEAD><TITLE>Samsung Enterprise Portal mySingle</TITLE>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<STYLE id=mysingle_style type=text/css>P {
        MARGIN-TOP: 5px; FONT-FAMILY: Arial, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
TD {
        MARGIN-TOP: 5px; FONT-FAMILY: Arial, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
LI {
        MARGIN-TOP: 5px; FONT-FAMILY: Arial, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
BODY {
        LINE-HEIGHT: 1.4; MARGIN: 10px; FONT-FAMILY: Arial, arial; FONT-SIZE: 9pt
}
</STYLE>

<META name=GENERATOR content=ActiveSquare></HEAD>
<BODY>
<P>Hello all, John McCall,</P>
<P>    I have attached a patch for the issue we discussed previously "<A href="http://clang-developers.42468.n3.nabble.com/Throwing-exceptions-from-temporary-object-s-destructor-td4026498.html">http://clang-developers.42468.n3.nabble.com/Throwing-exceptions-from-temporary-object-s-destructor-td4026498.html</A>" specifically targetting only init-temp1.C(from gcc test suite) . Tested the patch on X86-linux and ARM-linux ran clang regression, all test cases passed except CodeGenCXX/temporaries.cpp.</P>
<P>   The issue was due to same landingpad being used for constructor and destructor of the same object and the parent auto var decl is not cleaned up(destructor called) when the destructor threw an exception. This patch creates a new landing pad containing a call to parent auto var decl's destructor. Once this destructor is called all other cleanup items are threaded through.</P>
<P>   I met with regression failure for the case CodeGenCXX/temporaries.cpp. I have reduced the test case only to contain the failure portion attached in email(temporaries.test.cpp). There is some pattern which the test case expects and the fix changes the pattern so the test case fails. I have attached the .ll file generated with and without the patch. Can someone suggest how to modify the test case? also I would like to know the rational required to modify the test case. The 2 ".ll" files were generated with the patch on 3.1 branch.  Please let me know your comments.</P>
<P> </P>
<P>Description of attachments:</P>
<P>1) patch.p0.txt -  patch based on svn revision 163683</P>
<P>2) temporaries.test.cpp - reduced test case from CodeGenCXX/temporaries.cpp containing only the snippet causing failure.  If this snippet is removed from original test case, test passes.</P>
<P>3) temporaries.base.ll -  clang output without my changes for temporaries.test.cpp</P>
<P>4) temporaries.withchanges.ll - clang output with my changes for temporaries.test.cpp</P>
<P>5) init-temp1.C - test case from gcc test suite</P>
<P> </P>
<P>Regards</P>
<P>Senthil Kumar</P>
<P> </P></BODY></HTML><img src='http://ext.samsung.net/mailcheck/SeenTimeChecker?do=245c6227ec1d438f66d57dfc131d63b2a795fec30a5f93fd9cdd14f0554fc2de9e881b09962f7767598ef4afaea8dfc718066911c76275ea08cece8541bc14eacf878f9a26ce15a0' border=0 width=0 height=0 style='display:none'>