[Bug c++/12751] [tree-ssa] wrong code: double destruction

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Oct 24 00:57: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=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()



More information about the Gcc-bugs mailing list