Path: utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!MCC.COM!rfg From: rfg@MCC.COM (Ron Guilmette) Newsgroups: gnu.g++.bug Subject: Bug in G++ 1.32.0 ... illegal m68k assembly code generated. Message-ID: <8901110123.AA16339@riunite.aca.mcc.com> Date: 11 Jan 89 01:23:40 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 55 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))) ; }