Bugzilla – Bug 529
[llvm-g++] Crash using placement new on an array type
Last modified: 2005-02-27 13:30:15
You need to log in before you can comment on or make changes to this bug.
At the URL you will find a simple test case. I had others run this case on their mac, and it was confirmed to die in the front end. Changing backends did not alter the error message at all. Error message (as noted in file) was: testcase.cpp: In member function `T& Array<T>::append() [with T = double[4][4]]': testcase.cpp:147: internal compiler error: Bus error
Here's a reduced testcase: --- typedef unsigned int size_t; extern "C++" { inline void* operator new(size_t, void* __p) throw() { return __p; } inline void* operator new[](size_t, void* __p) throw() { return __p; } } typedef double Ty[4]; void foo(Ty *XX) { new(XX) Ty(); } --- I don't have time right this second to look into this any more, but hopefully I'll get it fixed by tonight. -Chris
Okay, this was actually a trivial bug to fix. Here's the testcase: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050221/024325.html and here's the patch: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050221/024326.html Thanks for the report! -Chris