This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11525] ICE/segfault on C++ code
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jul 2003 14:47:12 -0000
- Subject: [Bug c++/11525] ICE/segfault on C++ code
- References: <20030715084746.11525.numerical.simulation@web.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11525
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-07-15 14:47:12
date| |
------- Additional Comments From bangerth at dealii dot org 2003-07-15 14:47 -------
OK, this is as small sas I can get it:
------------------------------------
template <typename> class X;
template<class T>
void foo() {
const unsigned int j = T().begin()->first;
X<int> v;
v[j].push_back(0);
}
-------------------------------------
With tonight's compiler, I get
tmp/gg> ../build-gcc/gcc-install/bin/c++ -c x.cc
x.cc: In function `void foo()':
x.cc:7: internal compiler error: Segmentation fault
Please submit a full bug report,
Note that this happens during template parsing time, not during
instantiation. I guess the code as is is illegal (since X is not
defined at the point of use, but the original code looked definitely
legal).
W.