* [Bug c++/31027] Compiler segfaults in simple virtual inheritance situation
2007-03-02 16:46 [Bug c++/31027] New: Compiler segfaults in simple virtual inheritance situation v dot lesk at ic dot ac dot uk
@ 2007-03-02 17:02 ` v dot lesk at ic dot ac dot uk
2007-03-02 17:03 ` v dot lesk at ic dot ac dot uk
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: v dot lesk at ic dot ac dot uk @ 2007-03-02 17:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from v dot lesk at ic dot ac dot uk 2007-03-02 17:02 -------
//Couldnt include attachment so attaching (short) code here. See next comment
for compiler output.
class A
{
private:
protected:
public:
};
template<typename T>
class C:
virtual public A
{
private:
protected:
public:
C();
template<typename T_OTHER>C(const C<T_OTHER>&);
C func(const class C<long>&)const;
operator bool(void)const;
};
template<typename T>
C<T>::
C()
{
}
template<typename T>
template<typename T_OTHER>
C<T>::
C(const C<T_OTHER>&a)
{
}
template<typename T>
C<T>
C<T>::
func(const class C<long>&)const
{
C<T>result;
return result;
}
template<typename T>
class D:
public C<T>
{
private:
protected:
public:
void func2(void);
};
template<typename T>
void
D<T>::
func2(void)
{
C<int>a;
a.func(a);
}
void func3(void)
{
C<int>a;
a.func(a);
}
int
main(int argc,const char*const*argv)
{
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31027
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/31027] Compiler segfaults in simple virtual inheritance situation
2007-03-02 16:46 [Bug c++/31027] New: Compiler segfaults in simple virtual inheritance situation v dot lesk at ic dot ac dot uk
2007-03-02 17:02 ` [Bug c++/31027] " v dot lesk at ic dot ac dot uk
@ 2007-03-02 17:03 ` v dot lesk at ic dot ac dot uk
2007-03-02 17:45 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: v dot lesk at ic dot ac dot uk @ 2007-03-02 17:03 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2477 bytes --]
------- Comment #2 from v dot lesk at ic dot ac dot uk 2007-03-02 17:03 -------
Compiler command and output for this bug :
g++ -v -save-temps -c -O0 ./source.C
Using built-in specs.
Target: i586-mandriva-linux-gnu
Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --enable-checking=release
--enable-languages=c,c++,ada,fortran,objc,obj-c++,java
--host=i586-mandriva-linux-gnu --with-cpu=generic --with-system-zlib
--enable-long-long --enable-__cxa_atexit --enable-clocale=gnu
--disable-libunwind-exceptions --enable-java-awt=gtk
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --enable-gtk-cairo
--enable-ssp --disable-libssp
Thread model: posix
gcc version 4.1.1 20060724 (prerelease) (4.1.1-3mdk)
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/cc1plus -E -quiet -v -D_GNU_SOURCE
./source.C -mtune=generic -O0 -fpch-preprocess -o source.ii
ignoring nonexistent directory "/bmm/home/vil/build/qt/include"
ignoring nonexistent directory
"/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../../i586-mandriva-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/bmm/home/vil/include
/bmm/soft/Linux_2.4/include/
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../../include/c++/4.1.1
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../../include/c++/4.1.1/i586-mandriva-linux-gnu
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../../include/c++/4.1.1/backward
/usr/local/include
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/include
/usr/include
End of search list.
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/cc1plus -fpreprocessed source.ii
-quiet -dumpbase source.C -mtune=generic -auxbase source -O0 -version -o
source.s
GNU C++ version 4.1.1 20060724 (prerelease) (4.1.1-3mdk)
(i586-mandriva-linux-gnu)
compiled by GNU C version 4.1.1 20060724 (prerelease) (4.1.1-3mdk).
GGC heuristics: --param ggc-min-expand=96 --param ggc-min-heapsize=125369
Compiler executable checksum: 60e98b6becb426227e419ae6a431d9b1
./source.C: In constructor C<T>::C(const C<T_OTHER>&) [with T_OTHER = int, T =
long int]:
./source.C:70: instantiated from here
./source.C:33: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:https://qa.mandriva.com/> for instructions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31027
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/31027] Compiler segfaults in simple virtual inheritance situation
2007-03-02 16:46 [Bug c++/31027] New: Compiler segfaults in simple virtual inheritance situation v dot lesk at ic dot ac dot uk
2007-03-02 17:02 ` [Bug c++/31027] " v dot lesk at ic dot ac dot uk
2007-03-02 17:03 ` v dot lesk at ic dot ac dot uk
@ 2007-03-02 17:45 ` pinskia at gcc dot gnu dot org
2007-03-07 21:44 ` v dot lesk at ic dot ac dot uk
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-02 17:45 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|blocker |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31027
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/31027] Compiler segfaults in simple virtual inheritance situation
2007-03-02 16:46 [Bug c++/31027] New: Compiler segfaults in simple virtual inheritance situation v dot lesk at ic dot ac dot uk
` (2 preceding siblings ...)
2007-03-02 17:45 ` pinskia at gcc dot gnu dot org
@ 2007-03-07 21:44 ` v dot lesk at ic dot ac dot uk
2007-03-09 4:54 ` [Bug c++/31027] [4.1/4.2/4.3 regression] " bangerth at dealii dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: v dot lesk at ic dot ac dot uk @ 2007-03-07 21:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from v dot lesk at ic dot ac dot uk 2007-03-07 21:44 -------
Created an attachment (id=13166)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13166&action=view)
Code which triggers bug
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31027
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/31027] [4.1/4.2/4.3 regression] Compiler segfaults in simple virtual inheritance situation
2007-03-02 16:46 [Bug c++/31027] New: Compiler segfaults in simple virtual inheritance situation v dot lesk at ic dot ac dot uk
` (3 preceding siblings ...)
2007-03-07 21:44 ` v dot lesk at ic dot ac dot uk
@ 2007-03-09 4:54 ` bangerth at dealii dot org
2007-03-09 11:28 ` v dot lesk at ic dot ac dot uk
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: bangerth at dealii dot org @ 2007-03-09 4:54 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/31027] [4.1/4.2/4.3 regression] Compiler segfaults in simple virtual inheritance situation
2007-03-02 16:46 [Bug c++/31027] New: Compiler segfaults in simple virtual inheritance situation v dot lesk at ic dot ac dot uk
` (4 preceding siblings ...)
2007-03-09 4:54 ` [Bug c++/31027] [4.1/4.2/4.3 regression] " bangerth at dealii dot org
@ 2007-03-09 11:28 ` v dot lesk at ic dot ac dot uk
2007-04-13 15:51 ` v dot lesk at ic dot ac dot uk
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: v dot lesk at ic dot ac dot uk @ 2007-03-09 11:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from v dot lesk at ic dot ac dot uk 2007-03-09 11:28 -------
Can anyone suggest a workaround?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31027
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/31027] [4.1/4.2/4.3 regression] Compiler segfaults in simple virtual inheritance situation
2007-03-02 16:46 [Bug c++/31027] New: Compiler segfaults in simple virtual inheritance situation v dot lesk at ic dot ac dot uk
` (5 preceding siblings ...)
2007-03-09 11:28 ` v dot lesk at ic dot ac dot uk
@ 2007-04-13 15:51 ` v dot lesk at ic dot ac dot uk
2007-06-30 9:08 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: v dot lesk at ic dot ac dot uk @ 2007-04-13 15:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from v dot lesk at ic dot ac dot uk 2007-04-13 16:51 -------
I have verified that this bug also occurs on g++ 4.0.3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31027
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/31027] [4.1/4.2/4.3 regression] Compiler segfaults in simple virtual inheritance situation
2007-03-02 16:46 [Bug c++/31027] New: Compiler segfaults in simple virtual inheritance situation v dot lesk at ic dot ac dot uk
` (6 preceding siblings ...)
2007-04-13 15:51 ` v dot lesk at ic dot ac dot uk
@ 2007-06-30 9:08 ` pinskia at gcc dot gnu dot org
2007-07-04 3:05 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-30 9:08 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31027
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/31027] [4.1/4.2/4.3 regression] Compiler segfaults in simple virtual inheritance situation
2007-03-02 16:46 [Bug c++/31027] New: Compiler segfaults in simple virtual inheritance situation v dot lesk at ic dot ac dot uk
` (7 preceding siblings ...)
2007-06-30 9:08 ` pinskia at gcc dot gnu dot org
@ 2007-07-04 3:05 ` mmitchel at gcc dot gnu dot org
2007-07-11 21:52 ` paolo at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-07-04 3:05 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31027
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/31027] [4.1/4.2/4.3 regression] Compiler segfaults in simple virtual inheritance situation
2007-03-02 16:46 [Bug c++/31027] New: Compiler segfaults in simple virtual inheritance situation v dot lesk at ic dot ac dot uk
` (8 preceding siblings ...)
2007-07-04 3:05 ` mmitchel at gcc dot gnu dot org
@ 2007-07-11 21:52 ` paolo at gcc dot gnu dot org
2007-07-11 21:54 ` paolo at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: paolo at gcc dot gnu dot org @ 2007-07-11 21:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from paolo at gcc dot gnu dot org 2007-07-11 21:52 -------
Subject: Bug 31027
Author: paolo
Date: Wed Jul 11 21:52:04 2007
New Revision: 126558
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126558
Log:
2007-07-11 Paolo Carlini <pcarlini@suse.de>
PR c++/31027
* g++.dg/inherit/virtual4.C: New.
Added:
trunk/gcc/testsuite/g++.dg/inherit/virtual4.C
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31027
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/31027] [4.1/4.2/4.3 regression] Compiler segfaults in simple virtual inheritance situation
2007-03-02 16:46 [Bug c++/31027] New: Compiler segfaults in simple virtual inheritance situation v dot lesk at ic dot ac dot uk
` (9 preceding siblings ...)
2007-07-11 21:52 ` paolo at gcc dot gnu dot org
@ 2007-07-11 21:54 ` paolo at gcc dot gnu dot org
2007-07-11 21:56 ` [Bug c++/31027] [4.1 " pcarlini at suse dot de
2008-07-04 16:03 ` jsm28 at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: paolo at gcc dot gnu dot org @ 2007-07-11 21:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from paolo at gcc dot gnu dot org 2007-07-11 21:54 -------
Subject: Bug 31027
Author: paolo
Date: Wed Jul 11 21:54:36 2007
New Revision: 126559
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126559
Log:
2007-07-11 Paolo Carlini <pcarlini@suse.de>
PR c++/31027
* g++.dg/inherit/virtual4.C: New.
Added:
branches/gcc-4_2-branch/gcc/testsuite/g++.dg/inherit/virtual4.C
Modified:
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31027
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/31027] [4.1 regression] Compiler segfaults in simple virtual inheritance situation
2007-03-02 16:46 [Bug c++/31027] New: Compiler segfaults in simple virtual inheritance situation v dot lesk at ic dot ac dot uk
` (10 preceding siblings ...)
2007-07-11 21:54 ` paolo at gcc dot gnu dot org
@ 2007-07-11 21:56 ` pcarlini at suse dot de
2008-07-04 16:03 ` jsm28 at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: pcarlini at suse dot de @ 2007-07-11 21:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pcarlini at suse dot de 2007-07-11 21:56 -------
Doesn't fail anymore in mainline and 4_2-branch.
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.1/4.2/4.3 regression] |[4.1 regression] Compiler
|Compiler segfaults in simple|segfaults in simple virtual
|virtual inheritance |inheritance situation
|situation |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31027
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/31027] [4.1 regression] Compiler segfaults in simple virtual inheritance situation
2007-03-02 16:46 [Bug c++/31027] New: Compiler segfaults in simple virtual inheritance situation v dot lesk at ic dot ac dot uk
` (11 preceding siblings ...)
2007-07-11 21:56 ` [Bug c++/31027] [4.1 " pcarlini at suse dot de
@ 2008-07-04 16:03 ` jsm28 at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 16:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jsm28 at gcc dot gnu dot org 2008-07-04 16:02 -------
Closing 4.1 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to fail| |4.1.3
Resolution| |FIXED
Target Milestone|4.1.3 |4.2.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31027
^ permalink raw reply [flat|nested] 14+ messages in thread