[Bug c++/12789] [tree-ssa] Miscompilation of small program
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Tue Oct 28 19:13:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12789
------- Additional Comments From bangerth at dealii dot org 2003-10-28 18:02 -------
This is indeed almost certainly the same bug. Here's something smaller:
-----------------------------
#include <cstdio>
struct X
{
X() { printf ("X::X\n"); }
~X() { printf ("X::~X\n"); }
};
void foo (const int i) {
X x1, x2;
if (i == 1) return;
foo (1);
}
int main () {
foo (0);
}
------------------------------
I get 4 calls to the ctor, and 5 to the dtor.
W.
More information about the Gcc-bugs
mailing list