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++/14108] New: ICE on simple testcase


I couldn't find a record for this bug, even if #12103 looked similar.
Here is the reduced testcase I made :

class ClassC {
public:
  ~ClassC();
};

class ClassA {
  virtual ClassC f();
};

class ClassB : public virtual ClassA {
  virtual ClassC f();
};

ClassC ClassB::f() {
  return ClassC();
}

The G++ error returned :

$ sparc-sun-solaris2.8-g++ -c bugtest.cpp
bugtest.cpp: In member function `ClassC ClassB::_ZTv0_n12_N6ClassB1fEv()':
bugtest.cpp:17: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

It seems to be related to the ClassC destructor, the 'public virtual'
inheritance of ClassA in ClassB, and the definition of ClassB::f() outside of
ClassB. They are all necessary to reproduce the error.

It concerns gcc-3.4-20040128 cross-compiled for solaris2.8 with :
configure --prefix="/cygdrive/d/work/MSYS/home/cross-builds/builds-sparc"
--target=sparc-sun-solaris2.8
--with-sysroot="/cygdrive/d/work/MSYS/home/cross-builds/arch-original/sparc-runtime"
--with-gnu-as --with-gnu-ld --without-newlib --enable-threads --disable-nls

I don't have any other gcc 3.4 to test with yet.
The testcase can be compiled without error with gcc-3.2-20020927 (cygwin target).

Regards,
Emmanuel

-- 
           Summary: ICE on simple testcase
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: altacsd at yahoo dot fr
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: sparc-sun-solaris2.8


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14108


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