------- Comment #9 from jason at gcc dot gnu dot org 2007-09-06 05:36 ------- This version of the test breaks under ICC:
---------------------- extern "C" void abort (); int counter = 0; int thrown = 0; struct a { ~a () { if (!thrown++) throw 1; } }; int f (a const&, const a&) { return 1; } struct b { b (...) { ++counter; } ~b () { --counter; } }; void g(); int main () { try { b tmp(f (a(), a())); } catch (...) {} if (counter != 0) abort (); } ---------------------- For whatever reason, if the first ~a throws, ICC doesn't try to destroy tmp, but if the second ~a throws, ICC cleans up tmp properly. Odd. -- jason at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2005-06-19 15:11:05 |2007-09-06 05:36:24 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15764