Gcc 4.4 revision 133605 failed to bootstrap on Fedora 8 at stage 2: cc1: warnings being treated as errors insn-emit.c: In function ‘gen_cmpdi_ccno_1_rex64’: insn-emit.c:37: error: implicit declaration of function ‘gen_rtx_SET’ insn-emit.c:40: error: implicit declaration of function ‘gen_rtx_COMPARE’ insn-emit.c:42: error: return makes pointer from integer without a cast Many macros are changed at stage 2: bash-3.2$ diff -up prev-gcc/genrtl.h gcc --- prev-gcc/genrtl.h 2008-03-26 06:40:15.000000000 -0700 +++ gcc/genrtl.h 2008-03-26 06:42:38.000000000 -0700 @@ -234,343 +234,343 @@ extern rtx gen_rtx_fmt_Ee_stat (RTX_COD gen_rtx_fmt_Ee_stat (c, m, p0, p1 MEM_STAT_INFO) -#define gen_rtx_EXPR_LIST(MODE, ARG0, ARG1) \ +#define gen_rtx_raw_EXPR_LIST(MODE, ARG0, ARG1) \ gen_rtx_fmt_ee (EXPR_LIST, (MODE), (ARG0), (ARG1)) -#define gen_rtx_INSN_LIST(MODE, ARG0, ARG1) \ +#define gen_rtx_raw_INSN_LIST(MODE, ARG0, ARG1) \ gen_rtx_fmt_ue (INSN_LIST, (MODE), (ARG0), (ARG1)) -#define gen_rtx_SEQUENCE(MODE, ARG0) \ +#define gen_rtx_raw_SEQUENCE(MODE, ARG0) \ gen_rtx_fmt_E (SEQUENCE, (MODE), (ARG0)) ... Revision 133533 is OK.
Confirmed on i686-apple-darwin9.
I started regression hunt. I suspect this patch http://gcc.gnu.org/ml/gcc-patches/2008-03/msg01572.html is the cause.
I think this function /* Return nonzero if the RTL code given by index IDX is one that we should generate a gen_rtx_raw_FOO macro for, not gen_rtx_FOO (because gen_rtx_FOO is a wrapper in emit-rtl.c). */ static int special_rtx (int idx) { return (strcmp (defs[idx].enumname, "CONST_INT") == 0 || strcmp (defs[idx].enumname, "REG") == 0 || strcmp (defs[idx].enumname, "SUBREG") == 0 || strcmp (defs[idx].enumname, "MEM") == 0 || strcmp (defs[idx].enumname, "CONST_VECTOR") == 0); } in gengenrtl.c is miscompiled at stage 2.
Fixed.
It is actually VRP that is confused: <bb 42>: # iftmp.10_86 = PHI <&"raw_"[0](37), &""[0](40), &"raw_"[0](83), &"raw_"[0](41), &"raw_"[0](39), &"raw_"[0](38)> - printf (&"#define gen_rtx_%s%s(MODE"[0], iftmp.10_86, D.4658_79); + printf (&"#define gen_rtx_%s%s(MODE"[0], &"raw_"[0], D.4658_79); -D.4342_1: ~[0B, 0B] +D.4342_1: [&"int "[0], &"struct basic_block_def *"[0]] huhm.
Hm, fold_binary_to_constant (LT_EXPR, boolean_type_node, &"raw_"[0], &""[0]) returns "raw_" < "" (which has TREE_CONSTANT set). tree-vrp.c:operand_less_p doesn't expect that, but only expects 0 or non-0: tcmp = fold_binary_to_constant (LT_EXPR, boolean_type_node, val, val2); if (!tcmp) return -2; if (!integer_zerop (tcmp)) return 1;