The invalid code below results in "internal compiler error: in pop_binding, at 
cp/name-lookup.c:380" 
with a checking version of GCC 4.0.1.  Does not happen with GCC 3.3.4.

class NameOne : public static_small_value
{
 inline NameOne(T v) {
 }
{
};
template<class KEY, class VALUE>
class NameTwo : private NameThree
{
    void NameFour(const struct NameFive &cache);

This code is a greatly-reduced (and anonymized) excerpt, found by Daniel 
Wilkerson's Delta, from some 
real PalmSource code; I'm not sure it makes any sense at all.  The original 
code seemed to give a 
different compiler error, which I'll try to file separately; though it involves 
16K lines of proprietary code, 
so it may have to wait for our CodeSourcery support agreement.

===========
Session:
117> /opt/gcc401chk/bin/g++ -v  
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/
104911_HtmlView_min.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/104911_HtmlView_min.ii 
-quiet -dumpbase 
104911_HtmlView_min.ii -mtune=pentiumpro -auxbase 104911_HtmlView_min -version 
-o /tmp/
ccKTKYmH.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/104911_HtmlView_min.ii:2:
 error: 
expected class-name before ‘{’ token
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii:3:
 error: 
expected `)' before ‘v’
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii:5:
 error: 
expected unqualified-id before ‘{’ token
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii:9:
 error: 
expected class-name before ‘{’ token
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii:10:
 error: 
expected `}' at end of input
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii:10:
 error: 
expected unqualified-id at end of input
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii:10:
 internal 
compiler error: in pop_binding, at cp/name-lookup.c:380
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


PalmSource bug 104911

-- 
           Summary: internal compiler error: in pop_binding, at cp/name-
                    lookup.c:380
           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=22603

Reply via email to