------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-29 01:41 ------- Reduced a little further, note removing the templates make it go away: template<typename _CharT> struct basic_ostream { basic_ostream& operator<<(int __n); }; extern basic_ostream<char> cout; template<int> struct linear_congruential { template<class CharT> friend basic_ostream<CharT>& operator<<(basic_ostream<CharT>& os, const linear_congruential& lcg) { return os << 1; } }; void instantiate_all() { linear_congruential<0> lcf; cout << lcf; }
------ Here is the back trace: #0 0x002723cc in block_alloc (b=0) at /Users/pinskia/src/local3/gcc/gcc/local-alloc.c:1629 #1 0x002720b8 in block_alloc (b=0) at /Users/pinskia/src/local3/gcc/gcc/local-alloc.c:1598 #2 0x002731a4 in local_alloc () at /Users/pinskia/src/local3/gcc/gcc/local-alloc.c:420 #3 0x0030bdb0 in rest_of_compilation () at /Users/pinskia/src/local3/gcc/gcc/passes.c:492 #4 0x000d3a54 in execute_pass_list (pass=0x40574eb8) at /Users/pinskia/src/local3/gcc/gcc/tree- optimize.c:512 #5 0x000d3d48 in tree_rest_of_compilation (fndecl=0x4160146c) at /Users/pinskia/src/local3/gcc/ gcc/tree-optimize.c:648 #6 0x0007e984 in expand_body (fn=0x4160146c) at /Users/pinskia/src/local3/gcc/gcc/cp/ semantics.c:2895 #7 0x00331244 in cgraph_expand_function (node=0x424bdc80) at /Users/pinskia/src/local3/gcc/ gcc/cgraphunit.c:822 #8 0x00331e34 in cgraph_optimize () at /Users/pinskia/src/local3/gcc/gcc/cgraphunit.c:1689 #9 0x00047d50 in cp_finish_file () at /Users/pinskia/src/local3/gcc/gcc/cp/decl2.c:3070 #10 0x000bb42c in c_common_parse_file (set_yydebug=3) at /Users/pinskia/src/local3/gcc/gcc/c- opts.c:1093 #11 0x002ec6ec in toplev_main (argc=1112267904, argv=0x0) at /Users/pinskia/src/local3/gcc/gcc/ toplev.c:992 #12 0x000028e4 in _start (argc=1, argv=0x41600d00, envp=0x424bd880) at /SourceCache/Csu/Csu -47/crt.c:267 #13 0x8fe1a558 in __dyld__dyld_start () -- What |Removed |Added ---------------------------------------------------------------------------- Known to fail|4.0.0 3.4.0 |4.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18683