Hi all,<div><br></div><div>I was on stackoverflow when I came across this question: <a href="http://stackoverflow.com/questions/4173107/llvm-gcc-stdallocator-bug">http://stackoverflow.com/questions/4173107/llvm-gcc-stdallocator-bug</a>. It's causing a segmentation fault when compiled with llvm-g++ but not when compiled with g++. It also works under OS X but not under Ubuntu 10.10.</div>
<div><br></div><div>I've reduced a test case down to the following:</div><div><br></div><div><div>#include <vector></div><div><br></div><div>struct blub {};</div><div>struct intvec : public std::vector<int>, public blub {};</div>
<div><br></div><div>int main() {</div><div>    intvec d;</div><div>    intvec e(d);</div><div>}</div></div><div><br></div><div>The last interesting comment is that if I add the following copy constructor (as well as a default constructor), it works:</div>
<div><br></div><div><meta charset="utf-8"><div>    intvec(const intvec & other) : std::vector<int>(other)</div><div>    {}</div><div><br></div></div><div>If I add this copy constructor (and the same default constructor), it will still seg fault.</div>
<div><br></div><div><meta charset="utf-8"><div>    intvec(const intvec & other) : std::vector<int>(other), blub(other)</div><div>    {}</div><div><br></div></div><div><br></div><div>Anyone have any ideas about this?</div>
<div>Thanks,</div><div>Bill Lynch</div>