Bug 3349 - another ICE (in convert_for_assignment)
: another ICE (in convert_for_assignment)
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/gcc3.2-c++)
: unstable
: all Linux
: P2 normal
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2003-12-07 19:54 by
Modified: 2006-03-26 22:14 (History)


Attachments


Note

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


Description From 2003-12-07 19:54:28
$ cat > a.cc
template <typename T> T make_smth(void);

template <typename T1, typename T2> struct struct1
{
typeof(make_smth<T2>()(*make_smth<T1>()))
operator*() {}
};

struct struct2
{
template <typename T> typeof(T::first)
operator()(T t) const { return t.first; }
};

struct data { int first; };
void g(void) { *struct1<data*, struct2>(); }

$ g++ a.cc
a.cc: In member function `__typeof (T::first) struct2::operator()(T) const [with
T = data]':
a.cc:6:   instantiated from `struct1<data*, struct2>'
a.cc:16:   instantiated from here
a.cc:12: Internal compiler error in convert_for_assignment, at cp/typeck.c:6169
------- Comment #1 From 2003-12-30 14:39:47 -------
$ g++-3.3 test.cc
test.cc: In member function `__typeof (T::first) struct2::operator()(T) const
[with T = data]':
test.cc:6:   instantiated from `struct1<data*, struct2>'
test.cc:16:   instantiated from here
test.cc:12: internal compiler error: in convert_for_assignment, at cp/typeck.c:5917
------- Comment #2 From 2005-01-11 18:35:20 -------
fixed in gcc3.4