[gnu.g++.bug] const friend method causes assertion failure

eichin@ATHENA.MIT.EDU (Mark W. Eichin) (11/14/89)

(The following fails identically on Sun 4-os4.0.3 and on vax-4.3 as
seen below; both are G++ 1.36.1) _Mark_ <eichin@athena.mit.edu>
// crash1.C
// Simple example cooked down from a mutated form of the OOPS LIBRARY.
// I *think* this is valid C++ (2.0 at least) but even so, assertions
// should never fail. Mark W. Eichin <eichin@athena.mit.edu>

class Rectangle 
{  
public:
 friend int operator*(int i) const { return 3; };
};

// the end 

charon% /mit/gnu/vaxbin/g++ -v -c crash1.C
gcc version 1.36.1 (based on GCC 1.36)
 /mit/gnu/vaxlib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dvax -Dunix -D__vax__ -D__unix__ crash1.C /usr/tmp/cc005024.cpp
GNU CPP version 1.36
 /mit/gnu/vaxlib/gcc-cc1plus /usr/tmp/cc005024.cpp -quiet -dumpbase crash1.C -version -o /usr/tmp/cc005024.s
GNU C++ version 1.36.1 (based on GCC 1.36) (vax) compiled by GNU C version 1.36.
default target switches:
Failed assertion TREE_CODE (type) == METHOD_TYPE at line 4993 of `cplus-decl.c'.
/mit/gnu/vaxbin/g++: Program cc1plus got fatal signal 4.

Compilation finished at Mon Nov 13 22:59:42