Bug 3346 - another ICE in g++
: another ICE in g++
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/gcc4.1-c++)
: unstable
: all Linux
: P2 normal
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2003-12-06 11:09 by
Modified: 2008-10-18 16:07 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2003-12-06 11:09:40
$ 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 From 2003-12-30 14:37:14 -------
test.cc: In function `void g()':
test.cc:3: internal compiler error: in write_type, at cp/mangle.c:1555
------- Comment #2 From 2005-01-11 18:34:27 -------
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 From 2006-05-27 04:02:48 -------
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 From 2008-10-18 16:07:56 -------
$ 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