This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]