* Re: gcc: Internal compiler error: program cc1 got fatal signal 6 [not found] <3186527a.28880263@mail.eunet.ch> @ 1996-05-02 16:26 ` Richard Henderson 0 siblings, 0 replies; 5+ messages in thread From: Richard Henderson @ 1996-05-02 16:26 UTC (permalink / raw) The bug that Francois reported is fixed in the most recent gcc snapshot, but I was thinking that that does the rest of you very little good. I spent some time trying to isolate the change that fixed the problem, but for naught. The patch below does fix the problem, but is not aesthetically pleasing as it simply patches reload.c all the way up to the most recent snapshot. Enjoy. r~ --- reload.c.orig Mon Mar 25 20:30:39 1996 +++ reload.c Mon Apr 22 21:51:15 1996 @@ -1,5 +1,5 @@ /* Search an insn for pseudo regs that must be in hard regs and are not. - Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 89, 92-5, 1996 Free Software Foundation, Inc. This file is part of GNU CC. @@ -291,6 +291,7 @@ static int push_secondary_reload PROTO((int, rtx, int, int, enum reg_class, enum machine_mode, enum reload_type, enum insn_code *)); +static enum reg_class find_valid_class PROTO((enum machine_mode, int)); static int push_reload PROTO((rtx, rtx, rtx *, rtx *, enum reg_class, enum machine_mode, enum machine_mode, int, int, int, enum reload_type)); @@ -360,6 +361,9 @@ /* If X is a paradoxical SUBREG, use the inner value to determine both the mode and object being reloaded. */ if (GET_CODE (x) == SUBREG +#ifdef CLASS_CANNOT_CHANGE_SIZE + && reload_class != CLASS_CANNOT_CHANGE_SIZE +#endif && (GET_MODE_SIZE (GET_MODE (x)) > GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))) { @@ -688,6 +692,38 @@ } #endif /* SECONDARY_MEMORY_NEEDED */ \f +/* Find the largest class for which every register number plus N is valid in + M1 (if in range). Abort if no such class exists. */ + +static enum reg_class +find_valid_class (m1, n) + enum machine_mode m1; + int n; +{ + int class; + int regno; + enum reg_class best_class; + int best_size = 0; + + for (class = 1; class < N_REG_CLASSES; class++) + { + int bad = 0; + for (regno = 0; regno < FIRST_PSEUDO_REGISTER && ! bad; regno++) + if (TEST_HARD_REG_BIT (reg_class_contents[class], regno) + && TEST_HARD_REG_BIT (reg_class_contents[class], regno + n) + && ! HARD_REGNO_MODE_OK (regno + n, m1)) + bad = 1; + + if (! bad && reg_class_size[class] > best_size) + best_class = class, best_size = reg_class_size[class]; + } + + if (best_size == 0) + abort (); + + return best_class; +} +\f /* Record one reload that needs to be performed. IN is an rtx saying where the data are to be found before this instruction. OUT says where they must be stored after the instruction. @@ -890,17 +926,23 @@ However, we must reload the inner reg *as well as* the subreg in that case. */ + /* Similar issue for (SUBREG constant ...) if it was not handled by the + code above. This can happen if SUBREG_WORD != 0. */ + if (in != 0 && GET_CODE (in) == SUBREG - && GET_CODE (SUBREG_REG (in)) == REG - && REGNO (SUBREG_REG (in)) < FIRST_PSEUDO_REGISTER - && (! HARD_REGNO_MODE_OK (REGNO (SUBREG_REG (in)), inmode) - || (GET_MODE_SIZE (inmode) <= UNITS_PER_WORD - && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))) - > UNITS_PER_WORD) - && ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))) - / UNITS_PER_WORD) - != HARD_REGNO_NREGS (REGNO (SUBREG_REG (in)), - GET_MODE (SUBREG_REG (in))))))) + && (CONSTANT_P (SUBREG_REG (in)) + || (GET_CODE (SUBREG_REG (in)) == REG + && REGNO (SUBREG_REG (in)) < FIRST_PSEUDO_REGISTER + && (! HARD_REGNO_MODE_OK (REGNO (SUBREG_REG (in)) + + SUBREG_WORD (in), + inmode) + || (GET_MODE_SIZE (inmode) <= UNITS_PER_WORD + && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))) + > UNITS_PER_WORD) + && ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))) + / UNITS_PER_WORD) + != HARD_REGNO_NREGS (REGNO (SUBREG_REG (in)), + GET_MODE (SUBREG_REG (in))))))))) { /* This relies on the fact that emit_reload_insns outputs the instructions for input reloads of type RELOAD_OTHER in the same @@ -908,11 +950,11 @@ RELOAD_OTHER, we are guaranteed that this inner reload will be output before the outer reload. */ push_reload (SUBREG_REG (in), NULL_RTX, &SUBREG_REG (in), NULL_PTR, - GENERAL_REGS, VOIDmode, VOIDmode, 0, 0, opnum, type); + find_valid_class (inmode, SUBREG_WORD (in)), + VOIDmode, VOIDmode, 0, 0, opnum, type); dont_remove_subreg = 1; } - /* Similarly for paradoxical and problematical SUBREGs on the output. Note that there is no reason we need worry about the previous value of SUBREG_REG (out); even if wider than out, @@ -981,7 +1023,8 @@ if (out != 0 && GET_CODE (out) == SUBREG && GET_CODE (SUBREG_REG (out)) == REG && REGNO (SUBREG_REG (out)) < FIRST_PSEUDO_REGISTER - && (! HARD_REGNO_MODE_OK (REGNO (SUBREG_REG (out)), outmode) + && (! HARD_REGNO_MODE_OK (REGNO (SUBREG_REG (out)) + SUBREG_WORD (out), + outmode) || (GET_MODE_SIZE (outmode) <= UNITS_PER_WORD && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))) > UNITS_PER_WORD) @@ -997,7 +1040,9 @@ output after the outer reload. */ dont_remove_subreg = 1; push_reload (SUBREG_REG (out), SUBREG_REG (out), &SUBREG_REG (out), - &SUBREG_REG (out), ALL_REGS, VOIDmode, VOIDmode, 0, 0, + &SUBREG_REG (out), + find_valid_class (outmode, SUBREG_WORD (out)), + VOIDmode, VOIDmode, 0, 0, opnum, RELOAD_OTHER); } @@ -1230,9 +1275,13 @@ For example, we may now have both IN and OUT while the old one may have just one of them. */ - if (inmode != VOIDmode) + /* The modes can be different. If they are, we want to reload in + the larger mode, so that the value is valid for both modes. */ + if (inmode != VOIDmode + && GET_MODE_SIZE (inmode) > GET_MODE_SIZE (reload_inmode[i])) reload_inmode[i] = inmode; - if (outmode != VOIDmode) + if (outmode != VOIDmode + && GET_MODE_SIZE (outmode) > GET_MODE_SIZE (reload_outmode[i])) reload_outmode[i] = outmode; if (in != 0) reload_in[i] = in; @@ -5517,7 +5566,7 @@ /* Reject VALUE if it was loaded from GOAL and is also a register that appears in the address of GOAL. */ - if (goal_mem && value == SET_DEST (PATTERN (where)) + if (goal_mem && value == SET_DEST (single_set (where)) && refers_to_regno_for_reload_p (valueno, (valueno + HARD_REGNO_NREGS (valueno, mode)), @@ -5899,7 +5948,7 @@ fprintf (stderr, ", inc by %d\n", reload_inc[r]); if (reload_nocombine[r]) - fprintf (stderr, ", can combine", reload_nocombine[r]); + fprintf (stderr, ", can't combine", reload_nocombine[r]); if (reload_secondary_p[r]) fprintf (stderr, ", secondary_reload_p"); ^ permalink raw reply [flat|nested] 5+ messages in thread
* gcc: Internal compiler error: program cc1 got fatal signal 6 @ 1996-04-27 19:42 Francois Jaccard 1996-04-28 4:51 ` Jim Paradis 1996-04-29 14:31 ` Jay Estabrook - Alpha Migration Tools - LINUX Project 0 siblings, 2 replies; 5+ messages in thread From: Francois Jaccard @ 1996-04-27 19:42 UTC (permalink / raw) Hi, I am trying to compile the program Internet Movie Database v3.2d and I get: gcc: Internal compiler error: program cc1 got fatal signal 6 What is signal 6? I read the FAQ (03/11/95) and there is signal 4 and 11 but not 6. If I remove the "-O2", I am able to compile. I have kernel 1.3.95 and running Red Hat 2.1/AXP. Here is the complete output: gcc -v -O2 -DCOMPRESS -DHAVE_TEMPNAM=0 -DLOGFILE=0 -DZLISTCAT=\"/bin/gzip\" -DZLISTEXT=\".gz\" -DZDBSCAT=\"/bin/gzip\" -DZDBSEXT=\".gz\" -DZDBSCATOPTS=\"-cd\" -DZLISTCATOPTS=\"-cd\" -DRAWDIR="\"/usr/local/moviedb-3.2/lists/\"" -DDBDIR="\"/usr/local/moviedb-3.2/dbs/\"" -DETCDIR="\"/usr/local/moviedb-3.2/etc/\"" -DLOGFILENAME="\"/tmp/.imdb_log\"" -c mkdb.c Reading specs from /usr/lib/gcc-lib/alpha-linux/2.7.1/specs gcc version 2.7.1 /usr/lib/gcc-lib/alpha-linux/2.7.1/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -D__alpha -D__alpha__ -D__linux__ -D__linux -D_LONGLONG -Dlinux -Dunix -D__alpha -D__alpha__ -D__linux__ -D__linux -D_LONGLONG -D__linux__ -D__unix__ -D__linux -D__unix -Asystem(linux) -Acpu(alpha) -Amachine(alpha) -D__OPTIMIZE__ -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C -DCOMPRESS -DHAVE_TEMPNAM=0 -DLOGFILE=0 -DZLISTCAT="/bin/gzip" -DZLISTEXT=".gz" -DZDBSCAT="/bin/gzip" -DZDBSEXT=".gz" -DZDBSCATOPTS="-cd" -DZLISTCATOPTS="-cd" -DRAWDIR="/usr/local/moviedb-3.2/lists/" -DDBDIR="/usr/local/moviedb-3.2/dbs/" -DETCDIR="/usr/local/moviedb-3.2/etc/" -DLOGFILENAME="/tmp/.imdb_log" mkdb.c /tmp/cca03260.i GNU CPP version 2.7.1 (Linux/Alpha) #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/alpha-linux/include /usr/lib/gcc-lib/alpha-linux/2.7.1/include /usr/include End of search list. /usr/lib/gcc-lib/alpha-linux/2.7.1/cc1 /tmp/cca03260.i -quiet -dumpbase mkdb.c -O2 -version -o /tmp/cca03260.s GNU C version 2.7.1 (Linux/Alpha) compiled by GNU C version 2.7.1. gcc: Internal compiler error: program cc1 got fatal signal 6 make[2]: *** [mkdb.o] Error 1 make[2]: Leaving directory `/usr/local/moviedb-3.2/src' make[1]: *** [do-compile] Error 2 make[1]: Leaving directory `/usr/local/moviedb-3.2' make: *** [compile] Error 2 Thanks, ---- Francois Jaccard PGP Key ID: 0x3D7B9109 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc: Internal compiler error: program cc1 got fatal signal 6 1996-04-27 19:42 Francois Jaccard @ 1996-04-28 4:51 ` Jim Paradis 1996-04-29 14:31 ` Jay Estabrook - Alpha Migration Tools - LINUX Project 1 sibling, 0 replies; 5+ messages in thread From: Jim Paradis @ 1996-04-28 4:51 UTC (permalink / raw) > > Hi, > I am trying to compile the program Internet Movie Database v3.2d and I get: > gcc: Internal compiler error: program cc1 got fatal signal 6 > > What is signal 6? I read the FAQ (03/11/95) and there is signal 4 and 11 but > not 6. If I remove the "-O2", I am able to compile. I have kernel 1.3.95 and > running Red Hat 2.1/AXP. This means you have a bug in gcc. Signal 6 is "SIGABRT". It is what gcc uses when it panics. This often occurs when there is a bug in the GCC machine description file such that it generates an insn sequence that the optimizer can't handle. The alpha code gnerator for GCC is a tad-bit fragile, needless to say... -- Jim Paradis (paradis@amt.tay1.dec.com) "It's not procrastination, Digital Equipment Corporation it's my new Just-In-Time (508)952-4047 Workload Management System!" http://www.tiac.net/users/jrp/index.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc: Internal compiler error: program cc1 got fatal signal 6 1996-04-27 19:42 Francois Jaccard 1996-04-28 4:51 ` Jim Paradis @ 1996-04-29 14:31 ` Jay Estabrook - Alpha Migration Tools - LINUX Project 1996-04-29 17:58 ` Richard Henderson 1 sibling, 1 reply; 5+ messages in thread From: Jay Estabrook - Alpha Migration Tools - LINUX Project @ 1996-04-29 14:31 UTC (permalink / raw) > Hi, > I am trying to compile the program Internet Movie Database v3.2d and I get: > gcc: Internal compiler error: program cc1 got fatal signal 6 > > What is signal 6? I read the FAQ (03/11/95) and there is signal 4 and 11 but > not 6. If I remove the "-O2", I am able to compile. I have kernel 1.3.95 and > running Red Hat 2.1/AXP. I ran into this porting the XFree86 servers a few times, so there's something you might try. I found that short<->{float,double} conversions were the problem in a number of instances; try looking for anything like that, and force a short<->int conversion *FIRST*, then the int<->{float,double} should work OK. This was with an earlier version of GCC, but I think it's the one shipped with RH 2.1/AXP. I don't know if it has been fixed in the latest GCC...??? --Jay++ ------------------------------------------------------------------------------- American Non Sequitur Society: we don't make sense, but we do like pizza... Jay A Estabrook Alpha Migration Tools Mailstop: TAY1-2 (DTN) 227-4202 Digital Equipment Corp. (external) (508) 952-4202 151 Taylor Street enet: jestabro@amt.tay1.dec.com Littleton, MA 01460-1407 decnet: tallis::jestabro ------------------------------------------------------------------------------- ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc: Internal compiler error: program cc1 got fatal signal 6 1996-04-29 14:31 ` Jay Estabrook - Alpha Migration Tools - LINUX Project @ 1996-04-29 17:58 ` Richard Henderson 0 siblings, 0 replies; 5+ messages in thread From: Richard Henderson @ 1996-04-29 17:58 UTC (permalink / raw) > I found that short<->{float,double} conversions were the problem in a number > of instances; try looking for anything like that, and force a short<->int > conversion *FIRST*, then the int<->{float,double} should work OK. Do you have an isolated example of this? Or, failing that, a non-isolated example? r~ ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1996-05-02 16:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <3186527a.28880263@mail.eunet.ch>
1996-05-02 16:26 ` gcc: Internal compiler error: program cc1 got fatal signal 6 Richard Henderson
1996-04-27 19:42 Francois Jaccard
1996-04-28 4:51 ` Jim Paradis
1996-04-29 14:31 ` Jay Estabrook - Alpha Migration Tools - LINUX Project
1996-04-29 17:58 ` Richard Henderson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox