This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15889] g++ crash
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2004 13:13:53 -0000
- Subject: [Bug c++/15889] g++ crash
- References: <20040609113536.15889.hijaszu@hlfslinux.hu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-06-09 13:13 -------
Confirmed. Here's a reduced testcase:
-----------------
template <typename T> struct S {
typedef int size_type;
};
template <typename T> struct C {
typedef typename S<T>::size_type size_type;
size_type foo();
};
template <typename T>
C<T>::size_type<T>
C<T>::foo() { return 1; };
----------------------------
The code is invalid (it should read C<T>::size_type, not C<T>::size_type<T>;
the return type also needs a 'typename') but we ICE anyway:
g/x> /home/bangerth/bin/gcc-3.3.4-pre/bin/c++ -c x.cc
x.cc:13: internal compiler error: tree check: expected record_type, have
typename_type in lookup_template_class, at cp/pt.c:4127
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
This is not a regression against previous versions, though, and it is fixed
since 3.4, so I close it as fixed.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Keywords| |ice-on-invalid-code
Known to fail| |2.95.3 3.2.3 3.3.4
Known to work| |3.4.0 3.5.0
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15889