This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12751] [tree-ssa] wrong code: double destruction
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Oct 2003 00:32:29 -0000
- Subject: [Bug c++/12751] [tree-ssa] wrong code: double destruction
- References: <20031023234537.12751.stefaandr@hotmail.com>
- 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=12751
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-24 00:32 -------
This looks like an eh problem because in gimple it looks right.
Here is a different example that uses printf instead of cout:
#include <string>
extern "C" int printf(const char*,...);
struct a {
a() { printf("%p->a()\n");}
~a() { printf("%p->a()\n"); }
};
int main() {
a a1;
std::string x;
switch(0) {
case 1:
{
a a2;
return 0;
}
};
};
0xbffffd18->a()
0xbffffba0->a()
0x0->a()