With the patch for PR37535 applied to mainline GCC the bootstrap still fails due to a miscompilation. The problem is that r52 is assigned to r6 what collides with an INSN loading r6 with a parameter for a CALL.
I think the problem is created in ira_flattening. Allocno a3 is a parent of a87. For a87 the conflict with r6 is properly recorded. Afterwards ira_flatting merges a87 into a3 without propagating the conflict_hard_regs set. So the conflict with r6 is lost and ira_reassign_pseudos later on assigns r52 to hard reg r6. There is already code in ira_flattening which propagates the conflict sets. But the code is only enabled if propagate_p is true. This in turn seems only to get set if the loop once merged allocnos with different regnos?! I unfortunately don't understand this enough to come up with a patch. So I better leave that to you :) Please contact me if you need more information. I wasn't able to reduce the testcase (genattrtab) since it is quite difficult to see from the code if the miscompile occurred or not. ;; a3(r52,l0) conflicts: a1(r87,l0) ...... ;; total conflict hard regs: 0-6 14 ;; conflict hard regs: 0-5 14 ;; a87(r52,l2) conflicts: a86(r48,l2) ..... ;; total conflict hard regs: 0-6 14 ;; conflict hard regs: 0-6 14 ... Moving ranges of a87r52 to a3r52: [245..248] [234..243] [229..232] [218..227] [173..189] [126..169] ... Try assign 52(a3), cost=268: reassign to 6 -- Summary: Bootstrap failure due to miscompilation of genattrtab Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: krebbel at gcc dot gnu dot org GCC build triplet: s390x-ibm-linux GCC host triplet: s390x-ibm-linux GCC target triplet: s390x-ibm-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674