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

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Mon Oct 27 18:15: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


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.



More information about the Gcc-bugs mailing list