This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31027] [4.1/4.2/4.3 regression] Compiler segfaults in simple virtual inheritance situation
- 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 Mar 2007 04:54:24 -0000
- Subject: [Bug c++/31027] [4.1/4.2/4.3 regression] Compiler segfaults in simple virtual inheritance situation
- References: <bug-31027-14183@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from bangerth at dealii dot org 2007-03-09 04:54 -------
Confirmed. This is a regression introduced in 4.0.x.
Somewhat shorter:
----------------
struct A {};
template<typename T>
struct C: virtual A {
C() {};
template<typename T_OTHER> C(const C<T_OTHER>&) {};
C func(const class C<long>&) const;
operator bool()const;
};
template<typename T>
struct D: C<T> {
void func2() {
C<int>a;
a.func(a);
}
};
void func3() {
C<int>a;
a.func(a);
}
--------------------
g/x> c++ -c x.cc
x.cc: In constructor 'C<T>::C(const C<T_OTHER>&) [with T_OTHER = int, T = long
int]':
x.cc:21: instantiated from here
x.cc:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.suse.de/feedback> for instructions.
The funny thing is that we need to keep the class template D around, even
though it is completely unused...
W.
--
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bangerth at dealii dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords|rejects-valid |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2007-03-09 04:54:24
date| |
Summary|Compiler segfaults in simple|[4.1/4.2/4.3 regression]
|virtual inheritance |Compiler segfaults in simple
|situation |virtual inheritance
| |situation
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31027