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: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Oct 2003 18:08:21 -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
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-10-27 18:08:20
date| |
------- Additional Comments From bangerth at dealii dot org 2003-10-27 18:08 -------
Andrew's code is close, but not quite valid. Here's a valid variant:
---------------------------------
#include <string>
extern "C" int printf(const char*,...);
struct a {
a() { printf("a::a\n"); }
~a() { printf("a::~a\n"); }
};
int main() {
a a1;
std::string x;
switch(0) {
case 1:
{
a a2;
return 0;
}
};
};
-------------------------------------------
I can confirm the failure with a tree-ssa snapshot from 20031024.
W.