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]

Internal compiler error.


Just thought you ought to know... ;-)

gcc -v
Reading specs from /mnt/vendor/solaris/gnu/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/specs
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)

uname -a
SunOS athene 5.5.1 Generic_103640-12 sun4u sparc SUNW,Ultra-60


g++ -c -g -Wall -I.  -o bug.o bug.cc
bug.cc:14: Internal compiler error.
bug.cc:14: Please submit a full bug report to `egcs-bugs@cygnus.com'.

bug.cc ---

#include <iostream>

template<int n>
class nTree
{
public:
  friend istream& operator>> <>( istream&, nTree&);
  friend ostream& operator<< <>( ostream&, nTree&);
  
};

template<int n>
istream& operator>> <>( istream &is, nTree<n> &nt)
{
  return is;
}

template<int n>
ostream& operator<< <>( ostream &os, nTree<n> &nt)
{
  os << nt._val << endl;
  for( int i=0; i<n; i++)
    if( nt._subTree[i])
      os << *nt._subTree[i];
  return os;
}

int main( int argc, char *argv[])
{
  nTree<2> theTree;
}


-- 


Ta ta fa noo,
	     The Rubber Buccaneer a.k.a. rap@maths.soton.ac.uk

###								      ###
# #      WWW page at http://www.maths.soton.ac.uk/rap/HomePage.html   # #
# #                                                                   # #
# #  			It's good stuff!			      # #
# #                                                                   # #
# #    Sub-sections of note:                                          # #
# #          Psychobilly database : rap/psycho.html                   # #
# #          The state of the nation : rap/State_of_the_Nation.html   # #
# #                                                                   # #
###								      ###


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