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]
Other format: [Raw text]

[Bug c++/11525] ICE/segfault on C++ code


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.


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