Hello all, Fixed regression failure CodeGenCXX/temporaries.cpp found in previous patch. Attachments contain the failing g++ test case and the patch containing fix. Patch fixes Bug 12306 ini-temp1.C issue only.
Regards Senthil Kumar ------- Original Message ------- Sender : SENTHIL KUMAR THANGAVELU<[email protected]> ./Senior Technical Manager/SISO-Mobile Protocols & Platforms/Samsung Electronics Date : Sep 12, 2012 20:40 (GMT+09:00) Title : Patch for "Throwing exceptions from temporary object's destructor" issue Hello all, John McCall, I have attached a patch for the issue we discussed previously "http://clang-developers.42468.n3.nabble.com/Throwing-exceptions-from-temporary-object-s-destructor-td4026498.html" 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. 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. 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. Description of attachments: 1) patch.p0.txt - patch based on svn revision 163683 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. 3) temporaries.base.ll - clang output without my changes for temporaries.test.cpp 4) temporaries.withchanges.ll - clang output with my changes for temporaries.test.cpp 5) init-temp1.C - test case from gcc test suite Regards Senthil Kumar
patch.sep17.p0.txt
Description: Binary data
init-temp1.C
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
