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]

internal compiler error 237



When compiling the code attached at the end of this message (from LEDA
3.6.1) with: 

mav> gcc -v
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.25/specs
gcc version egcs-2.91.25 19980425 (gcc2 ss-980401 experimental)
=====================================================================

I get the following error message:
cd /home/mav/develop/router-src/c++-tests/
gcc -c template.cc 
template.cc: In function `void * leda_copy<empty>(const class empty &)':
template.cc:8: Internal compiler error 237.
template.cc:8: Please submit a full bug report to `egcs-bugs@cygnus.com'.

Compilation exited abnormally with code 1 at Fri May  8 15:42:33

=====================================================================
This is the code:
[if e in main is declared as not_so_empty e, eveything is fine
 (well, at least the compiler doesn't bomb out)]
=====================================================================

typedef unsigned int size_t;

inline void* operator new(size_t, void* where, int) { return where; }

template<class T>
inline void* leda_copy(const T& x)
{ void* p=0;
 new((void*)(&p),0) T(x);
 return p;
}

class empty {};
class not_so_empty {int i;};

main()
{
  empty e;
  leda_copy(e);
}


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