Bug 3346

Summary: another ICE in g++
Product: Sisyphus Reporter: Alexey Voinov <voins>
Component: gcc4.1-c++Assignee: Dmitry V. Levin <ldv>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P2 CC: glebfm
Version: unstable   
Hardware: all   
OS: Linux   

Description Alexey Voinov 2003-12-06 11:09:40 MSK
$ cat >test.cc
template <typename R> R make_smth(void);
template <typename T> typeof(make_smth<T>()) f(T t) { return t; }
void g(void) { int i; f(i); }

$ g++ test.cc
test.cc: In function `void g()':
test.cc:3: Internal compiler error in write_type, at cp/mangle.c:1473
...
Comment 1 Alexey Voinov 2003-12-30 14:37:14 MSK
test.cc: In function `void g()':
test.cc:3: internal compiler error: in write_type, at cp/mangle.c:1555
Comment 2 Alexey Voinov 2005-01-11 18:34:27 MSK
still in gcc3.4:
test.cc: In function `void g()':
test.cc:3: internal compiler error: in write_type, at cp/mangle.c:1579
Comment 3 Dmitry V. Levin 2006-05-27 04:02:48 MSD
Same with g++ 4.1.1:
test.cc: In function '__typeof__ (make_smth<T>()) f(T) [with T = int]':
test.cc:2: internal compiler error: in write_type, at cp/mangle.c:1651

- maybe I should report it upstream? :)
Comment 4 Dmitry V. Levin 2008-10-18 16:07:56 MSD
$ g++-4.3 test.cc
test.cc: In function '__typeof__ (make_smth<T>()) f(T) [with T = int]':
test.cc:2: sorry, unimplemented: mangling typeof, use decltype instead