Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Ron Guilmette
Wed, 11 Jan 1989 01:23
Bug in G++ 1.32.0 ... illegal m68k assembly code generated.
Author: Ron Guilmette
Date: Wed, 11 Jan 1989 01:23
Date: Wed, 11 Jan 1989 01:23
55 lines
1770 bytes
1770 bytes
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))) ;
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads