Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!shelby!apple!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!ATHENA.MIT.EDU!eichin From: eichin@ATHENA.MIT.EDU (Mark W. Eichin) Newsgroups: gnu.g++.bug Subject: const friend method causes assertion failure (1.36.1) Message-ID: <8911140403.AA12644@HODGE.MIT.EDU> Date: 14 Nov 89 04:03:44 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 26 (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_ // 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 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