Bug 3346 - another ICE in g++
Summary: another ICE in g++
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: gcc4.1-c++ (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: Dmitry V. Levin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-06 11:09 MSK by Alexey Voinov
Modified: 2008-10-18 16:07 MSD (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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