[Bug rtl-optimization/40552] New: wrong-code with -fsched2-use-superblocks and exceptions
wouter dot vermaelen at scarlet dot be
gcc-bugzilla@gcc.gnu.org
Thu Jun 25 16:01:00 GMT 2009
> cat bug.cc
#include <string>
void f() {
throw 1;
}
struct Foo {
Foo(const std::string& s);
std::string s;
};
Foo::Foo(const std::string& s_)
: s(s_)
{
f();
}
int main() {
try {
Foo foo("");
} catch (...) {
}
}
> g++ -O2 -fsched2-use-superblocks bug.cc
> ./a.out
Aborted (core dumped)
(This program should exit normally.)
Backtrace:
#0 0x00007fd3d9e9b065 in raise () from /lib/libc.so.6
#1 0x00007fd3d9e9e153 in abort () from /lib/libc.so.6
#2 0x00007fd3da1cdb41 in _Unwind_Resume () from /lib/libgcc_s.so.1
#3 0x0000000000400a02 in Foo (this=0x7fffe2b81eb0, s_=@0x4377) at bug.cc:16
...
I'm using SVN revision 148947 on linux x86_64.
--
Summary: wrong-code with -fsched2-use-superblocks and exceptions
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wouter dot vermaelen at scarlet dot be
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40552
More information about the Gcc-bugs
mailing list