[Bug c++/28787] Internal compiler error (ICE) when trying to initialize function in template
--- Comment #1 from rguenth at gcc dot gnu dot org 2006-08-21 10:48 --- Indeed a dup of that PR. *** This bug has been marked as a duplicate of 27807 *** -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Keywords||ice-on-invalid-code Resolution||DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28787
[Bug c++/28787] Internal compiler error (ICE) when trying to initialize function in template
--- Comment #2 from vlukas at gmx dot de 2006-08-21 11:01 --- Indeed a dup of that PR. *** This bug has been marked as a duplicate of 27807 *** I do not mean to sound impertinent, but with GCC 4.2.0 20060820 (experimental), I can not reproduce bug 27807. However the code I submitted still crashes this same version. Doesn't that mean the the fix for 27807 does not at the same time fix this? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28787
[Bug c++/28787] Internal compiler error (ICE) when trying to initialize function in template
--- Comment #3 from vlukas at gmx dot de 2006-08-21 12:04 --- A variation of the code crashes GCC 4.2.0 20060820 (experimental) with a different ICE: -- templatetypename void f() { typedef void (t)(); t a = x; } void g() { fint(); } -- This produces the following output: -- b.cc: In function 'void f()': b.cc:5: error: function 'void a()' is initialized like a variable b.cc:5: error: 'x' was not declared in this scope b.cc:5: internal compiler error: tree check: expected var_decl, have function_decl in cp_finish_decl, at cp/decl.c:5089 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://gcc.gnu.org/bugs.html for instructions. -- This latter snippet does not crash GCC 3.4.6 or 4.1.1. Should this rather get its own report? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28787
[Bug c++/28787] Internal compiler error (ICE) when trying to initialize function in template
--- Comment #4 from pinskia at gcc dot gnu dot org 2006-08-21 18:29 --- (In reply to comment #3) A variation of the code crashes GCC 4.2.0 20060820 (experimental) with a different ICE: That is most likely PR 27961. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28787