gcc bug report
John Nitao
nitao@s13es.llnl.gov
Sat Sep 9 20:02:00 GMT 2000
// g++ version: 2.95.2
// system: linux kernel 2.2.5-15smp, redhat release 6.0
// problem description:
// has fatal error during compilation
// when following flags are used: -funroll-loops -O
// I get following error messages:
// /tmp/ccOE5xnp.s: Assembler messages:
// /tmp/ccOE5xnp.s:49: Error: Symbol .LEHB26 already defined.
// /tmp/ccOE5xnp.s:57: Error: Symbol .LEHE26 already defined.
//
// note: bug goes away if non-inline destructor is used for class X
// or if following
// delete[] u;
// is removed from body of destructor
class X {
public:
#if 1
// doesn't work with following inline destructor
// (works fine if delete[] u; is removed from body)
~X() { delete [] u; }
#else
// also works fine with following
~X();
#endif
char *u;
};
bool operator == ( const X & lhs, const X & rhs );
struct MyPair {
X x;
};
class Test {
public:
MyPair *variables_;
bool fun() const;
};
bool Test::fun() const {
X k;
for(long i=0;i<10;i++) {
if(k == variables_[i].x) return 1;
}
return 0;
}
More information about the Gcc-bugs
mailing list