------- Comment #1 from cppljevans at suddenlink dot net  2007-10-31 15:09 
-------
I was unable to create attachment; so, here's the source (no #includes).
<-- cut here --
//Purpose:
//  Reproduce, with simplified code, the error:
/*
main.cpp:1675:   instantiated from here
main.cpp:1277: internal compiler error: in instantiate_class_template, at
cp/pt.c:6651
 */
//reported in main.cpp.log on line 767 which occured during
//compile of main.cpp with gcc-4.3-20071026 on:
//  Tue Oct 30 08:45:37
//The same error occurred with gcc-4.1, but not gcc-3.4.
//
template
  < typename Variables
  >
  struct
gram_tree
{
        typedef
      Variables
    vars
    ;
      struct
    defn_variable
    {
     public:
            typedef
          defn_variable
        my_type
        ;
        defn_variable(void)
        {}

        defn_variable(my_type const& a_copy)
        ;

        template
          < typename Rhs
          >
        defn_variable(Rhs const& a_rhs)
        ;
          my_type const&
        operator=(my_type const& a_var)
        ;
        template
          < typename Rhs
          >
          my_type const&
        operator=(Rhs const& a_rhs)
        ;

    };//end defn_variable struct

      struct
    productions
    {
        productions(void)
        ;
          defn_variable&
        operator[](typename vars::symb_enum)
        ;
    };//end productions struct

    //begin: Composite expressions

      struct
    expr_sequence
    {
        template
          < typename Left
          , typename Right
          >
          struct
        node
        {
            node(Left const& a_left, Right const& a_right)
            ;
        };
    };

    template
      < typename Left
      , typename Right
      >
        friend
      expr_sequence::node<Left,Right>
    operator>>(Left const& a_left, Right const& a_right)
    ;

    //end: Composite expressions

};//end gram_tree<Variables> struct

  struct
vars
{
      enum 
    symb_enum
      { e
      };

};//exit vars struct

  int
main(void)
{
    typedef gram_tree<vars> gt;
    gt::productions prods;

    prods[vars::e]=prods[vars::e] >> prods[vars::e] ;

    return 0;
}

>-- cut here --
and here's the make output
<-- cut here --
cd
/home/evansl/prog_dev/boost-svn/ro/trunk/sandbox/lje/libs/grammar_pipeline/test/spirit_proto/
make -f Makefile.imk bugrept
/usr/bin/g++-4.1 -c -Wall -ftemplate-depth-100 -O0 -fno-inline -v -save-temps
main-pt-c-ice.cpp -o bugrept
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686
--enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
 /usr/lib/gcc/i486-linux-gnu/4.1.2/cc1plus -E -quiet -v -D_GNU_SOURCE
main-pt-c-ice.cpp -mtune=i686 -Wall -ftemplate-depth-100 -fno-inline -O0
-fpch-preprocess -o main-pt-c-ice.ii
ignoring nonexistent directory "/usr/local/include/i486-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../i486-linux-gnu/include"
ignoring nonexistent directory "/usr/include/i486-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2
 /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/i486-linux-gnu
 /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward
 /usr/local/include
 /usr/lib/gcc/i486-linux-gnu/4.1.2/include
 /usr/include
End of search list.
 /usr/lib/gcc/i486-linux-gnu/4.1.2/cc1plus -fpreprocessed main-pt-c-ice.ii
-quiet -dumpbase main-pt-c-ice.cpp -mtune=i686 -auxbase-strip bugrept -O0 -Wall
-version -ftemplate-depth-100 -fno-inline -o main-pt-c-ice.s
GNU C++ version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) (i486-linux-gnu)
        compiled by GNU C version 4.1.2 20061115 (prerelease) (Debian
4.1.1-21).
GGC heuristics: --param ggc-min-expand=55 --param ggc-min-heapsize=48218
Compiler executable checksum: 183d42a838ed2b7313bffcb8f2f2fda7
main-pt-c-ice.cpp: In instantiation of
'gram_tree<vars>::expr_sequence::node<gram_tree<vars>::defn_variable,
gram_tree<vars>::defn_variable>':
main-pt-c-ice.cpp:109:   instantiated from here
main-pt-c-ice.cpp:74: internal compiler error: in instantiate_class_template,
at cp/pt.c:5652
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
Preprocessed source stored into /tmp/ccITi2V4.out file, please attach this to
your bugreport.
make: *** [bugrept] Error 1

Compilation exited abnormally with code 2 at Wed Oct 31 09:20:49

>-- cut here --


-- 


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

Reply via email to