------- Comment #4 from pinskia at gcc dot gnu dot org 2008-11-10 19:20 ------- Here is a better backtrace: #0 remap_ssa_name (name=0xb7d3c000, id=0xbfda005c) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree-inline.c:192 #1 0x08127db4 in copy_body_r (tp=0xb7d3dc28, walk_subtrees=0xbfd9fc78, data=0xbfda005c) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree-inline.c:599 #2 0x083f195b in walk_tree_1 (tp=0xb7d3dc28, func=0x8127a90 <copy_body_r>, data=0xbfda005c, pset=0x0, lh=0) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree.c:8618 #3 0x083f1a95 in walk_tree_1 (tp=0xb7d2ce1c, func=0x8127a90 <copy_body_r>, data=0xbfda005c, pset=0x0, lh=0) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree.c:8857 #4 0x0812735d in remap_type_1 (type=0xb7d2cb60, id=0xbfda005c) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree-inline.c:403 #5 0x08127517 in remap_type (type=0xb7d2cb60, id=0xbfda005c) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree-inline.c:430 #6 0x0812743e in remap_type_1 (type=0xb7d2cc40, id=0xbfda005c) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree-inline.c:311 #7 0x08127517 in remap_type (type=0xb7d2cc40, id=0xbfda005c) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree-inline.c:430 #8 0x08126f97 in remap_decl (decl=0xb7d35720, id=0xbfda005c) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree-inline.c:262 #9 0x081278d7 in remap_ssa_name (name=0xb7d3c2a4, id=0xbfda005c) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree-inline.c:176 #10 0x08127db4 in copy_body_r (tp=0xb7d3e0a0, walk_subtrees=0xbfd9fe48, data=0xbfda005c) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree-inline.c:599 #11 0x083f195b in walk_tree_1 (tp=0xb7d3e0a0, func=0x8127a90 <copy_body_r>, data=0xbfda005c, pset=0x0, lh=0) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree.c:8618 #12 0x083f1a95 in walk_tree_1 (tp=0xbfd9ff0c, func=0x8127a90 <copy_body_r>, data=0xbfda005c, pset=0x0, lh=0) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree.c:8857 #13 0x08128e59 in copy_bb (id=0xbfda005c, bb=0xb7d36168, frequency_scale=-1210851216, count_scale=1) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree-inline.c:826 #14 0x0812979f in copy_cfg_body (id=0xbfda005c, count=<value optimized out>, frequency=0, entry_block_map=0xb7d36fb4, exit_block_map=0xb7d367bc) at /home/apinski/src/gcc-sony/gcc-4.3-clean/gcc/gcc/tree-inline.c:1367
--- CUT --- And a reduced testcase: typedef __SIZE_TYPE__ size_t; inline void* operator new[](unsigned, void* __p) throw() { return __p; } void *malloc(size_t); template<typename DataT> inline void ConstructRawArray(DataT *data,unsigned size) { new(data) DataT[size]; } template<typename DataT> struct SingleBufferBodyC { DataT *buff; void *operator new(size_t s,void *mem) { } inline unsigned Size() const { } SingleBufferBodyC(unsigned nsize) { ConstructRawArray(this->buff,this->Size()); } }; template<typename DataT> struct SingleBufferC { SingleBufferC(unsigned size) { SingleBufferBodyC<DataT> *ret = reinterpret_cast<SingleBufferBodyC<DataT> *> (malloc(8)) ; new(ret) SingleBufferBodyC<DataT>(size); } }; struct TestObjC { TestObjC() { } int val; }; int TestSingleBuffer() { SingleBufferC<TestObjC> buff3(100); } -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- GCC build triplet|i686-apple-darwin9 | GCC host triplet|i686-apple-darwin9 | GCC target triplet|i686-apple-darwin9 | Keywords| |ice-on-valid-code Summary|ICE on valid code. |ICE during inlining of valid | |code http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38072