From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23064 invoked by alias); 22 Jul 2005 03:37:21 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 23047 invoked by uid 48); 22 Jul 2005 03:37:18 -0000 Date: Fri, 22 Jul 2005 03:38:00 -0000 From: "flash at pobox dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20050722033716.22604.flash@pobox.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/22604] New: "internal compiler error: Segmentation fault" with invalid nested classes X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg02665.txt.bz2 List-Id: The invalid code below results in "internal compiler error: Segmentation fault" with a checking version of GCC 4.0.1. Does not happen with GCC 3.3.4 or Apple GCC 4.0.0. Like the code for bug 22603, this is a greatly-reduced and anonymized excerpt, found by Daniel Wilkerson's Delta, from a real PalmSource file. (This reduction was found by looking for a segfault; the previous reduction looked for any compiler error.) I don't think this is the same bug as my 22508, since that one also happened with Apple GCC 4.0.0. It doesn't sound to me like 21975 or 22441 either. class NameOne; class NameTwo : virtual public SAtom { virtual NameOne* NameThree(); }; class NameFour : virtual public NameFive { class NameOne : public NameTwo { virtual NameOne* NameThree(); ====== Session: 125> /opt/gcc401chk/bin/g++ -v /Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/ BBinder_segfault.ii Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../configure --enable-checking --prefix=/opt/gcc401chk --enable-languages=c,c+ + Thread model: posix gcc version 4.0.1 /opt/gcc401chk/libexec/gcc/i686-pc-linux-gnu/4.0.1/cc1plus -fpreprocessed /Projects/ PlatformTools/compilerChain/tests/cpp/bugfiles/error/BBinder_segfault.ii -quiet -dumpbase BBinder_segfault.ii -mtune=pentiumpro -auxbase BBinder_segfault -version -o /tmp/ccuEkHiJ.s GNU C++ version 4.0.1 (i686-pc-linux-gnu) compiled by GNU C version 3.3.4 (pre 3.3.5 20040809). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 /Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/BBinder_segfault.ii:3: error: expected class-name before ‘{’ token /Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/BBinder_segfault.ii:7: error: expected class-name before ‘{’ token /Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/BBinder_segfault.ii:10: error: expected `}' at end of input /Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/BBinder_segfault.ii:10: error: invalid covariant return type for ‘virtual NameFour::NameOne* NameFour::NameOne::NameThree()’ /Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/BBinder_segfault.ii:4: error: overriding ‘virtual NameOne* NameTwo::NameThree()’ /Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/BBinder_segfault.ii:9: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Like bug 22603, this is tracked by PalmSouce bug 104911, though I suspect it's different. -- Summary: "internal compiler error: Segmentation fault" with invalid nested classes Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: flash at pobox dot com CC: gcc-bugs at gcc dot gnu dot org 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=22604