mike@turing.cs.unm.edu (Michael I. Bushnell) (02/04/89)
All the following is for a VAX running 4.3 BSD. When compiling gdb 3.1 with gcc 1.33, I ran into a gcc bug in the file printcmd.c as follows: gcc -gg -O -I. -c printcmd.c gcc: Program cc1 got fatal signal 10. When tracing this down, I found that cc1 stopped in cse.c inside equiv_constant(). It seems the code that does equiv-constanting for subreg RTX's assumes that a SUBREG rtx always has a REG as the first arg. According to the internals document, a MEM can occur between the combine pass and the reload pass. Cse happens before combine, but I guess the manual was wrong, as the rtx being equiv-constanted was a SUBREG with first argument MEM. I added a check in equiv_constant to not do the equivalencing (it can't hurt not to) for subregs with first arg non-REG. I'm not sure if the bug is that someone built one of these funny SUBREG rtx's too early, or that all the assumptions that the first arg is a REG were not removed from the code correctly. Anyway, if RMS (or whoever decides to look into this further) wants, I'll provide the rtl dumps of the relevant function that caused the problem to occur. Michael I. Bushnell \ This above all; to thine own self be true GIG! \ And it must follow, as the night the day, mike@turing.cs..unm.edu /\ Thou canst not be false to any man. Hmmmm.............. / \ Farewell: my blessing season this in thee!