This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12789] [tree-ssa] Miscompilation of small program
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Oct 2003 18:02:22 -0000
- Subject: [Bug c++/12789] [tree-ssa] Miscompilation of small program
- References: <20031027143336.12789.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.