This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/532: Internal compiler error in tsubst_expr, at cp/pt.c:7148



>Number:         532
>Category:       c++
>Synopsis:       Internal compiler error in tsubst_expr, at cp/pt.c:7148
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 13 02:16:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Gerald Pfeifer
>Release:        current CVS
>Organization:
>Environment:
i386-unknown-freebsd4.1
>Description:
Compiling the following snippet

---- snip ----
class ATOMSET
    {
    };

template <class T>
void addConstsTo(const T &container)
{
  typename T::const_iterator l=container.begin();
}

void tallyConstants()
{
  addConstsTo(ATOMSET());
}
---- snip ----

results in a compiler crash:

  y.cc: In function `void addConstsTo (const T &) [with T = ATOMSET]':
  y.cc:13:   instantiated from here
  y.cc:8: no type named `const_iterator' in `class ATOMSET'
  y.cc:8: no matching function for call to `ATOMSET::begin () const'
  y.cc:8: Tree check: expected class 'd', have 'x' (error_mark)
  y.cc:8: Internal compiler error in tsubst_expr, at cp/pt.c:7148
>How-To-Repeat:
Compile the snippet without any specific options.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]