[gnu.g++.bug] Failed assertion TREE_CODE

casotto@EROS.BERKELEY.EDU (Andrea Casotto) (05/20/89)

With version 1.35.0 on a VAX running ULTRIX 3.0.
This is the example.

----------------------------
class X {
    int a;
public:
    virtual char* getName() { return "X:a";};
};

class Y : public X {
    int gg;
public:
    char* getName() { return "Y:sss"; }
};
main()
{
    X x;
    Y y;
    
    char* ny = y.getName ;	// missing parenthesis due to distraction
    // char* ny = y.getName() ;	// this is what it should be 
    char* nx = x.getName() ;
}
-------------------------------------------
This is what I get:

g++ foo.cc
Failed assertion TREE_CODE (field) == FIELD_DECL at line 4191 of `cplus-class.c'.
g++: Program cc1plus got fatal signal 4.


------------------------------------------

		Ciao, Andrea