From CRM # 320356, Issue Tracker # 38348:
// Some levels of optimization make the bug go away.
// g++ -O2 -c bug.C
// This test case comes from g++ bug 13392, mentioned here.
// Our own code is too big to provide as a test case. However, since
// the crash signature is identical in both case and both involve the
// ternary operator generating temporaries, we believe they tickle the
// same compiler bug.
bool foo(std::string s=std::string())
assert((foo() && true,1)
Output of test without the optimization:
(cd /tmp;g++ -c bug.C)'
bug.C: In function `void bar()':
bug.C:35: Internal compiler error in convert_from_eh_region_ranges_1,
Customer is requesting we fix this asap.
Cannot reproduce this with gcc-3.2.3-34 (U2 gcc).
PR middle-end/1339 is certainly supposed to be fixed there.
What gcc the customer used?
They were using gcc-3.2.3-24, so it looks like the U2 update fixes
this. Will inform the customer.