On 1/13/15 01:32, Jeff Law wrote: > On 01/12/15 10:01, Jeff Law wrote: >> This indicates a violation of the type safety invariants we're adding to >> GCC. Simply changing the code to use rtx rather than rtx_insn is >> probably a step in the wrong direction. >> >> Part of the problem here is that RTX_FRAME_RELATED_P is valid on both >> rtx_insn and rtx objects. That's something we'll have to fix as the >> type safety work moves forward, assuming we continue towards the goal of >> totally separating rtx and rtx_insn objects. >> >> Returning to the code in h8300.c, we have "F" which assumes its argument >> is an rtx_insn. We should never be calling "F" will anything other than >> an rtx_insn argument. The calls from "Fpa" are the only violators of >> that invariant. >>
Oh, what you said above sound reasonable to me. "F" is also used by others which pass rtx_insn to "F". >> Given that the vectors inside the PARALLEL will always be rtx objects >> and that we always want to set RTX_FRAME_RELATED on those objects, it >> seems that we could just replace the call to "F" in "Fpa" with >> >> RTX_FRAME_RELATED_P (XVECEXP (par, 0, i)) = 1; >> >> >> That simplifies the code and removes a bogus as_a cast. >> Yeah, for me, it is a good idea. >> Can you try that and report back to me? > Nevermind. I went ahead and made this change and verified that libgcc, > libquadmath and newlib would build for the h8300-elf configuration. > Thank you for your work. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed