Compare failure building gcc-2.95 branch under VAX Ultrix 4.3
John David Anglin
dave@hiauly1.hia.nrc.ca
Mon May 8 12:46:00 GMT 2000
The following error occurs during make bootstrap on a VAX Ultrix 4.3
target comparing stage2 and stage3 when the compiler is built with -O2:
...
fi
Bootstrap comparison failure!
alias.o differs
bitmap.o differs
c-aux-info.o differs
c-common.o differs
...
Failure occurs earlier if the compiler is built with -O3.
To get this far, I had to install the following two patches:
--- calls.c.orig Fri May 7 21:58:39 1999
+++ calls.c Tue Apr 4 14:09:12 2000
@@ -405,7 +405,12 @@
#ifndef ACCUMULATE_OUTGOING_ARGS
#if defined (HAVE_call_pop) && defined (HAVE_call_value_pop)
- if (HAVE_call_pop && HAVE_call_value_pop && n_popped > 0)
+#if defined (HAVE_call) && defined (HAVE_call_value)
+ if (HAVE_call && HAVE_call_value && HAVE_call_pop && HAVE_call_value_pop
+ && n_popped > 0)
+#else
+ if (HAVE_call_pop && HAVE_call_value_pop)
+#endif
{
rtx n_pop = GEN_INT (n_popped);
rtx pat;
Wed Feb 18 07:14:47 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* reload.c (find_reloads): Always convert address reload for
non-reloaded operand to RELOAD_FOR_OPERAND_ADDRESS.
--- reload.c.orig Wed Jul 14 18:29:48 1999
+++ reload.c Fri Apr 7 15:48:47 2000
@@ -4042,11 +4042,8 @@
= RELOAD_FOR_OPADDR_ADDR;
}
- if (reload_when_needed[i] == RELOAD_FOR_INPADDR_ADDRESS
- || reload_when_needed[i] == RELOAD_FOR_OUTADDR_ADDRESS)
- reload_when_needed[i] = RELOAD_FOR_OPADDR_ADDR;
- else
- reload_when_needed[i] = RELOAD_FOR_OPERAND_ADDRESS;
+
+ reload_when_needed[i] = RELOAD_FOR_OPERAND_ADDRESS;
}
if ((reload_when_needed[i] == RELOAD_FOR_INPUT_ADDRESS
I reduced the code of the compare failure of gengenrtl.c to a simple test
case which is included at the end of the message. At -O2, the only difference
in the rtl between the output of the stage1 and stage2 compilers is:
--- find_formats.i.greg Mon May 8 15:01:30 2000
+++ ../ff2/find_formats.i.greg Mon May 8 15:04:25 2000
@@ -11,8 +11,7 @@
;; 40 conflicts: 23 37 40 48 49 50 0 14
;; 46 conflicts: 23 46 49 50 0 14
;; 46 preferences: 6
-;; 48 conflicts: 21 23 27 37 40 48 49 50 0 14
-;; 48 preferences: 6
+;; 48 conflicts: 21 23 27 37 40 48 49 50 0 6 14
;; 49 conflicts: 21 23 24 26 27 37 40 46 48 49 50 0 6 14
;; 50 conflicts: 23 37 40 46 48 49 50 0 14
;; 50 preferences: 6
At -O3, the difference increases. The rtl in .flow2 and .jump2 also differ.
The difference between the stage1 and stage2 .greg output is:
--- find_formats.i.greg Thu May 4 19:03:10 2000
+++ ../ff2/find_formats.i.greg Thu May 4 19:03:13 2000
@@ -5,8 +5,8 @@
;; 21 conflicts: 21 24 26 27 48 49 0 6 14
;; 23 conflicts: 23 37 40 46 48 49 50 0 14
;; 24 conflicts: 21 24 26 27 49 0 6 14
-;; 26 conflicts: 21 24 26 49 0 6 14
-;; 27 conflicts: 21 24 27 48 49 50 0 6 14
+;; 26 conflicts: 21 24 26 49 0 14
+;; 27 conflicts: 21 24 27 48 49 50 0 14
;; 37 conflicts: 23 37 40 48 49 50 0 14
;; 40 conflicts: 23 37 40 48 49 50 0 14
;; 46 conflicts: 23 46 49 50 0 14
@@ -32,8 +32,8 @@
Spilling for insn 116.
Spilling for insn 122.
;; Register dispositions:
-21 in 8 23 in 7 24 in 6 26 in 0 27 in 7 37 in 1
-40 in 0 46 in 0 48 in 6 49 in 9 50 in 8
+21 in 7 23 in 6 24 in 6 26 in 0 27 in 6 37 in 1
+40 in 0 46 in 0 48 in 8 49 in 9 50 in 7
;; Hard regs used: 0 1 6 7 8 9 13 14
@@ -54,7 +54,7 @@
;; Start of basic block 0, registers live: 13 [fp] 14 [sp]
(note 151 7 8 [bb 0] NOTE_INSN_BASIC_BLOCK)
-(insn 8 151 166 (set (reg/v:SI 8 r8)
+(insn 8 151 166 (set (reg/v:SI 7 r7)
(const_int 0 [0x0])) 18 {movsi} (nil)
(nil))
[deleted]
It looks like there is a problem in the conflict analysis of the stage2
compiler which leads to a different assignment of hard registers. This
can be seen in the different conflicts/preferences for pseudo 48 in the
-O2 case and pseudos 26 and 27 in the -O3 case. If somebody has any
suggestions or good places to point gdb, it would be greatly appreciated.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
PS: Things break down much earlier without the reload.c patch. Any comments
on this patch?
enum rtx_code {
UNKNOWN ,
NIL ,
EXPR_LIST ,
INSN_LIST ,
MATCH_OPERAND ,
MATCH_SCRATCH ,
MATCH_DUP ,
MATCH_OPERATOR ,
MATCH_PARALLEL ,
MATCH_OP_DUP ,
MATCH_PAR_DUP ,
MATCH_INSN ,
MATCH_INSN2 ,
DEFINE_INSN ,
DEFINE_PEEPHOLE ,
DEFINE_SPLIT ,
DEFINE_COMBINE ,
DEFINE_EXPAND ,
DEFINE_DELAY ,
DEFINE_FUNCTION_UNIT ,
DEFINE_ASM_ATTRIBUTES ,
SEQUENCE ,
ADDRESS ,
DEFINE_ATTR ,
ATTR ,
SET_ATTR ,
SET_ATTR_ALTERNATIVE ,
EQ_ATTR ,
ATTR_FLAG ,
INSN ,
JUMP_INSN ,
CALL_INSN ,
BARRIER ,
CODE_LABEL ,
NOTE ,
INLINE_HEADER ,
PARALLEL ,
ASM_INPUT ,
ASM_OPERANDS ,
UNSPEC ,
UNSPEC_VOLATILE ,
ADDR_VEC ,
ADDR_DIFF_VEC ,
SET ,
USE ,
CLOBBER ,
CALL ,
RETURN ,
TRAP_IF ,
CONST_INT ,
CONST_DOUBLE ,
CONST_STRING ,
CONST ,
PC ,
REG ,
SCRATCH ,
SUBREG ,
STRICT_LOW_PART ,
CONCAT ,
MEM ,
LABEL_REF ,
SYMBOL_REF ,
CC0 ,
ADDRESSOF ,
QUEUED ,
IF_THEN_ELSE ,
COND ,
COMPARE ,
PLUS ,
MINUS ,
NEG ,
MULT ,
DIV ,
MOD ,
UDIV ,
UMOD ,
AND ,
IOR ,
XOR ,
NOT ,
ASHIFT ,
ROTATE ,
ASHIFTRT ,
LSHIFTRT ,
ROTATERT ,
SMIN ,
SMAX ,
UMIN ,
UMAX ,
PRE_DEC ,
PRE_INC ,
POST_DEC ,
POST_INC ,
PRE_MODIFY ,
POST_MODIFY ,
NE ,
EQ ,
GE ,
GT ,
LE ,
LT ,
GEU ,
GTU ,
LEU ,
LTU ,
SIGN_EXTEND ,
ZERO_EXTEND ,
TRUNCATE ,
FLOAT_EXTEND ,
FLOAT_TRUNCATE ,
FLOAT ,
FIX ,
UNSIGNED_FLOAT ,
UNSIGNED_FIX ,
ABS ,
SQRT ,
FFS ,
SIGN_EXTRACT ,
ZERO_EXTRACT ,
HIGH ,
LO_SUM ,
RANGE_INFO ,
RANGE_REG ,
RANGE_VAR ,
RANGE_LIVE ,
CONSTANT_P_RTX ,
CALL_PLACEHOLDER ,
LAST_AND_UNUSED_RTX_CODE};
struct rtx_definition
{
const char *enumname, *name, *format;
};
struct rtx_definition defs[] =
{
{ "UNKNOWN" , "UnKnown" , "*" },
{ "NIL" , "nil" , "*" },
{ "EXPR_LIST" , "expr_list" , "ee" },
{ "INSN_LIST" , "insn_list" , "ue" },
{ "MATCH_OPERAND" , "match_operand" , "iss" },
{ "MATCH_SCRATCH" , "match_scratch" , "is" },
{ "MATCH_DUP" , "match_dup" , "i" },
{ "MATCH_OPERATOR" , "match_operator" , "isE" },
{ "MATCH_PARALLEL" , "match_parallel" , "isE" },
{ "MATCH_OP_DUP" , "match_op_dup" , "iE" },
{ "MATCH_PAR_DUP" , "match_par_dup" , "iE" },
{ "MATCH_INSN" , "match_insn" , "s" },
{ "MATCH_INSN2" , "match_insn2" , "is" },
{ "DEFINE_INSN" , "define_insn" , "sEssV" },
{ "DEFINE_PEEPHOLE" , "define_peephole" , "EssV" },
{ "DEFINE_SPLIT" , "define_split" , "EsES" },
{ "DEFINE_COMBINE" , "define_combine" , "Ess" },
{ "DEFINE_EXPAND" , "define_expand" , "sEss" },
{ "DEFINE_DELAY" , "define_delay" , "eE" },
{ "DEFINE_FUNCTION_UNIT" , "define_function_unit" , "siieiiV" },
{ "DEFINE_ASM_ATTRIBUTES" , "define_asm_attributes" , "V" },
{ "SEQUENCE" , "sequence" , "E" },
{ "ADDRESS" , "address" , "e" },
{ "DEFINE_ATTR" , "define_attr" , "sse" },
{ "ATTR" , "attr" , "s" },
{ "SET_ATTR" , "set_attr" , "ss" },
{ "SET_ATTR_ALTERNATIVE" , "set_attr_alternative" , "sE" },
{ "EQ_ATTR" , "eq_attr" , "ss" },
{ "ATTR_FLAG" , "attr_flag" , "s" },
{ "INSN" , "insn" , "iuueiee" },
{ "JUMP_INSN" , "jump_insn" , "iuueiee0" },
{ "CALL_INSN" , "call_insn" , "iuueieee" },
{ "BARRIER" , "barrier" , "iuu" },
{ "CODE_LABEL" , "code_label" , "iuuis00" },
{ "NOTE" , "note" , "iuusn" },
{ "INLINE_HEADER" , "inline_header" , "iuuuiiiiiieeiiEeEssE" },
{ "PARALLEL" , "parallel" , "E" },
{ "ASM_INPUT" , "asm_input" , "s" },
{ "ASM_OPERANDS" , "asm_operands" , "ssiEEsi" },
{ "UNSPEC" , "unspec" , "Ei" },
{ "UNSPEC_VOLATILE" , "unspec_volatile" , "Ei" },
{ "ADDR_VEC" , "addr_vec" , "E" },
{ "ADDR_DIFF_VEC" , "addr_diff_vec" , "eEeei" },
{ "SET" , "set" , "ee" },
{ "USE" , "use" , "e" },
{ "CLOBBER" , "clobber" , "e" },
{ "CALL" , "call" , "ee" },
{ "RETURN" , "return" , "" },
{ "TRAP_IF" , "trap_if" , "ee" },
{ "CONST_INT" , "const_int" , "w" },
{ "CONST_DOUBLE" , "const_double" , "e0ww" },
{ "CONST_STRING" , "const_string" , "s" },
{ "CONST" , "const" , "e" },
{ "PC" , "pc" , "" },
{ "REG" , "reg" , "i0" },
{ "SCRATCH" , "scratch" , "0" },
{ "SUBREG" , "subreg" , "ei" },
{ "STRICT_LOW_PART" , "strict_low_part" , "e" },
{ "CONCAT" , "concat" , "ee" },
{ "MEM" , "mem" , "e0" },
{ "LABEL_REF" , "label_ref" , "u00" },
{ "SYMBOL_REF" , "symbol_ref" , "s" },
{ "CC0" , "cc0" , "" },
{ "ADDRESSOF" , "addressof" , "ei0" },
{ "QUEUED" , "queued" , "eeeee" },
{ "IF_THEN_ELSE" , "if_then_else" , "eee" },
{ "COND" , "cond" , "Ee" },
{ "COMPARE" , "compare" , "ee" },
{ "PLUS" , "plus" , "ee" },
{ "MINUS" , "minus" , "ee" },
{ "NEG" , "neg" , "e" },
{ "MULT" , "mult" , "ee" },
{ "DIV" , "div" , "ee" },
{ "MOD" , "mod" , "ee" },
{ "UDIV" , "udiv" , "ee" },
{ "UMOD" , "umod" , "ee" },
{ "AND" , "and" , "ee" },
{ "IOR" , "ior" , "ee" },
{ "XOR" , "xor" , "ee" },
{ "NOT" , "not" , "e" },
{ "ASHIFT" , "ashift" , "ee" },
{ "ROTATE" , "rotate" , "ee" },
{ "ASHIFTRT" , "ashiftrt" , "ee" },
{ "LSHIFTRT" , "lshiftrt" , "ee" },
{ "ROTATERT" , "rotatert" , "ee" },
{ "SMIN" , "smin" , "ee" },
{ "SMAX" , "smax" , "ee" },
{ "UMIN" , "umin" , "ee" },
{ "UMAX" , "umax" , "ee" },
{ "PRE_DEC" , "pre_dec" , "e" },
{ "PRE_INC" , "pre_inc" , "e" },
{ "POST_DEC" , "post_dec" , "e" },
{ "POST_INC" , "post_inc" , "e" },
{ "PRE_MODIFY" , "pre_modify" , "ee" },
{ "POST_MODIFY" , "post_modify" , "ee" },
{ "NE" , "ne" , "ee" },
{ "EQ" , "eq" , "ee" },
{ "GE" , "ge" , "ee" },
{ "GT" , "gt" , "ee" },
{ "LE" , "le" , "ee" },
{ "LT" , "lt" , "ee" },
{ "GEU" , "geu" , "ee" },
{ "GTU" , "gtu" , "ee" },
{ "LEU" , "leu" , "ee" },
{ "LTU" , "ltu" , "ee" },
{ "SIGN_EXTEND" , "sign_extend" , "e" },
{ "ZERO_EXTEND" , "zero_extend" , "e" },
{ "TRUNCATE" , "truncate" , "e" },
{ "FLOAT_EXTEND" , "float_extend" , "e" },
{ "FLOAT_TRUNCATE" , "float_truncate" , "e" },
{ "FLOAT" , "float" , "e" },
{ "FIX" , "fix" , "e" },
{ "UNSIGNED_FLOAT" , "unsigned_float" , "e" },
{ "UNSIGNED_FIX" , "unsigned_fix" , "e" },
{ "ABS" , "abs" , "e" },
{ "SQRT" , "sqrt" , "e" },
{ "FFS" , "ffs" , "e" },
{ "SIGN_EXTRACT" , "sign_extract" , "eee" },
{ "ZERO_EXTRACT" , "zero_extract" , "eee" },
{ "HIGH" , "high" , "e" },
{ "LO_SUM" , "lo_sum" , "ee" },
{ "RANGE_INFO" , "range_info" , "uuEiiiiiibbii" },
{ "RANGE_REG" , "range_reg" , "iiiiiiiitt" },
{ "RANGE_VAR" , "range_var" , "eti" },
{ "RANGE_LIVE" , "range_live" , "bi" },
{ "CONSTANT_P_RTX" , "constant_p_rtx" , "e" },
{ "CALL_PLACEHOLDER" , "call_placeholder" , "uuuu" },
};
const char *formats[((int)LAST_AND_UNUSED_RTX_CODE) ];
extern char *strchr( const char *__s, int __c );
extern int strcmp( const char *__s1, const char *__s2 );
static int
special_format (fmt)
const char *fmt;
{
return (strchr (fmt, '*') != 0
|| strchr (fmt, 'V') != 0
|| strchr (fmt, 'S') != 0
|| strchr (fmt, 'n') != 0);
}
static void
find_formats ()
{
int i;
for (i = 0; i < ((int)LAST_AND_UNUSED_RTX_CODE) ; ++i)
{
const char **f;
if (special_format (defs[i].format))
continue;
for (f = formats; *f ; ++f)
if (! strcmp (*f, defs[i].format))
break;
if (!*f)
*f = defs[i].format;
}
}
More information about the Gcc-bugs
mailing list