rfg@MCC.COM (Ron Guilmette) (01/11/89)
The following short (34 line) example program, when compiled with G++ 1.32.0, causes the sun3 assembler to issue a (valid) error message. This does not occur if the same file is compiled using GCC 1.32. The error is that a BFINS instruction is generated whose first operand is a (68K) ADDRESS register rather than a DATA register. links: md == m68k.md aux-output.c == output-m68k.c config-h == xm-m68k.h tm.h == ---------------------------------------------------- | #define DOLLARS_IN_IDENTIFIERS 1 | #define INTEGRATE_THRESHOLD(DECL) 300 | #include "tm-sun3+.h" ---------------------------------------------------- /* ------------------------------ cut here --------------------------------- */ struct Node { union { struct { unsigned mark: 1, print: 1, type: 6, val: 24; } p; } uu; }; typedef struct Node NODE; inline NODE* newnode(int type, int size) { NODE *nnode; nnode = (NODE *) 0xff; return (nnode); } inline NODE *cons(NODE *x, NODE *y) { NODE *val; val = newnode(3,7); return (val); } void xlbind(NODE *sym, NODE *val, NODE *env) { register NODE *ptr; (((NODE*)((NODE*)env)->uu.p.val) = ptr) ; (((NODE*)((NODE*)ptr)->uu.p.val) = (cons(sym,val))) ; }