Compiling the following simple code snippet causes an ICE struct foo { }; struct A { template <class P> P foo() {} }; int main() { A::foo(); return 0; } [mozart] test > uname -a Linux mozart.shai.home 2.4.19-lac #1 Thu Aug 15 18:07:38 MDT 2002 i686 unknown [mozart] test > g++ -v Reading specs from /usr/local/lib/gcc33/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs Configured with: ../configure --prefix /usr/local/lib/gcc33 Thread model: posix gcc version 3.2.3 [mozart] test > g++ gcc_bug.C gcc_bug.C: In function `int main()': gcc_bug.C:4: Internal compiler error in walk_tree, at tree-inline.c:1326 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. When commenting out struct foo{}; the expected error message (no matching function for call to `foo()') appears.
Already fixed in 3.3.1 and the mainline.