This is the mail archive of the gcc@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]

Re: Is this a 3.4.2 bug (segfault compiling arts) ?


Well according to
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=260747
the distilled Oct 9th testcase is below. Removing extern seems to make the crash go away.


--
#include <iostream>
class Foo {
public:
Foo() { destroyed_ = false; }
~Foo() { if (destroyed_) std::cerr << "Destructor called twice!\n"; destroyed_ = true; }
void nop() { }
private:
bool destroyed_;
};
Foo bar;
int main() {
bar.nop();
return 0;
}
extern Foo bar;




--



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