From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6926 invoked by alias); 4 Dec 2007 17:52:32 -0000 Received: (qmail 6895 invoked by uid 48); 4 Dec 2007 17:52:20 -0000 Date: Tue, 04 Dec 2007 17:52:00 -0000 Subject: [Bug c++/34336] New: 4.2.2 internal error in stabilize_expr X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "gschrad at ll dot mit dot edu" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-12/txt/msg00288.txt.bz2 The following error occurs while compiling template code (included as error-4.2.2.ii at the tail of this report). > $ g++ -c error-4.2.2.cc > error-4.2.2.cc: In constructor 'ClassC::ClassC()': > error-4.2.2.cc:35: internal compiler error: in stabilize_expr, at cp/tree.c:2273 > Please submit a full bug report, > with preprocessed source if appropriate. > See for instructions. The same error occurs reliably on both Linux/Intel and Solaris/Sparc on Linux gcc -v produces: > Using built-in specs. > Target: i686-pc-linux-gnu > Configured with: ../gcc-4.2.2/configure --enable-languages=c,c++ --prefix=/data/rosa2/build/gcc/ins-4.2.2-Linux-i686 > Thread model: posix > gcc version 4.2.2 On Solaris gcc -v produces: > Using built-in specs. > Target: sparc-sun-solaris2.8 > Configured with: ../gcc-4.2.2/configure --prefix=/space/snail/gl17859/test-4.2.2/tools --with-threads=posix --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --with-cpu=v9 --enable-languages=c,c++ > Thread model: posix > gcc version 4.2.2 Note that the error does not occur with gcc 4.1.0: > Using built-in specs. > Target: i686-pc-linux-gnu > Configured with: ../gcc-4.0.1/configure --prefix=/tools/gcc-4.0.1 --disable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++ --enable-version-specific-runtime-libs > Thread model: posix > gcc version 4.0.1 == error-4.2.2.ii # 1 "error-4.2.2.cc" # 1 "" # 1 "" # 1 "error-4.2.2.cc" class ClassA; template class SmartPtr { private: T* m_p; public: T& operator*() { return *m_p; } }; class ClassB { public: ClassB(const ClassA &); }; template class ClassC { public: ClassC( ); private: SmartPtr m_xfr; }; template ClassC::ClassC( ) { ClassB *sr = new ClassB(*m_xfr); } -- Summary: 4.2.2 internal error in stabilize_expr Product: gcc Version: 4.2.2 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gschrad at ll dot mit dot edu GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34336