mason@tessi.UUCP (Mark Mason) (05/02/89)
I have set up gcc to cross-compile for the 32000 (running on a sun 3, os4.0).
Files:
config.h -> xm-sunos4.h
md -> ns32k.md
tm.h -> tm-sequent.h
aux-output.c -> output-ns32k.c
The file hash.c which the compiler died on is a cut-down version of
hash.c from gas (I have included it below). The compiler seemes to have
died in the function hash_say (from the time I left -quiet off by hand).
Thanks,
tektronix!tessi!mason
tessi:~ % gcc32 hash.c
gcc32: Program cc1 got fatal signal 6.
tessi:~ % gdb /usr/local/gnu/lib/gcc32-cc1 core
GDB 3.0, Copyright (C) 1988 Free Software Foundation, Inc.
There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details.
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "info copying" to see the conditions.
Reading symbol data from /usr/local/gnu/lib/gcc32-cc1...done.
Core file is from "gcc32-cc1".
Program terminated with signal 6, Abort.
Type "help" for a list of commands.
(gdb) where
#0 0x8002c in kill ()
#1 0x79d6a in abort ()
#2 0x68554 in final (first=(rtx) 0xba3a0, file=(struct _iobuf *) 0xb0810, write_symbols=NO_DEBUG, optimize=0, prescan=0) (final.c line 909)
#3 0x13568 in rest_of_compilation (decl=(tree) 0xc4056) (toplev.c line 1479)
#4 0xb120 in finish_function () (c-decl.c line 3554)
#5 0x276c in yyparse () (c-parse.y line 223)
#6 0x1282a in compile_file (name=(char *) 0xefffcf9 "/tmp/cca16055.cpp") (toplev.c line 990)
#7 0x13cfe in main (argc=7, argv=(char **) 0xefffc78, envp=(char **) 0xefffc98) (toplev.c line 1740)
(gdb) frame 2
#2 0x68554 in final (first=(rtx) 0xba3a0, file=(struct _iobuf *) 0xb0810, write_symbols=NO_DEBUG, optimize=0, prescan=0) (final.c line 909)
909 abort ();
(gdb) l
904 which follows a deleted test insn, and that test insn
905 needs to be reinserted. */
906 if (template == 0)
907 {
908 if (PREV_INSN (insn) != last_ignored_compare)
909 abort ();
910 insn = PREV_INSN (insn);
911 body = PATTERN (insn);
912 new_block = 0;
913 goto reinsert_compare;
(gdb) p insn
$1 = (rtx) 0xbaa18
(gdb) p last_ignored_compare
$2 = (rtx) 0x0
(gdb)
/*
* hash.c
*/
#include <stdio.h>
#define TRUE (1)
#define FALSE (0)
#include <ctype.h>
#define min(a, b) ((a) < (b) ? (a) : (b))
struct hash_entry
{
char * hash_string; /* points to where the symbol string is */
/* NULL means slot is not used */
/* DELETED means slot was deleted */
char * hash_value; /* user's datum, associated with symbol */
};
#define HASH_STATLENGTH (6)
struct hash_control
{
struct hash_entry * hash_where; /* address of hash table */
int hash_sizelog; /* Log of ( hash_mask + 1 ) */
int hash_mask; /* masks a hash into index into table */
int hash_full; /* when hash_stat[STAT_USED] exceeds this, */
/* grow table */
struct hash_entry * hash_wall; /* point just after last (usable) entry */
/* here we have some statistics */
int hash_stat[HASH_STATLENGTH]; /* lies & statistics */
/* we need STAT_USED & STAT_SIZE */
};
#define STATLENGTH (6) /* size of statistics block */
void
hash_say(handle,buffer,bufsiz)
register struct hash_control * handle;
register int buffer[/*bufsiz*/];
register int bufsiz;
{
register int * nd; /* limit of statistics block */
register int * ip; /* scan statistics */
ip = handle -> hash_stat;
nd = ip + min(bufsiz-1,STATLENGTH);
if (bufsiz>0) /* trust nothing! bufsiz<=0 is dangerous */
{
*buffer++ = STATLENGTH;
for (; ip<nd; ip++,buffer++)
{
*buffer = *ip;
}
}
}
/*
* end of hash.c
*/
/*
* Standard disclaimers apply
*
* uucp: tektronix!tessi!mason
*/