This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/66930] [5 Regression]: gengtype.c is miscompiled during stage2
- From: "olegendo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Jul 2015 03:47:44 +0000
- Subject: [Bug target/66930] [5 Regression]: gengtype.c is miscompiled during stage2
- Auto-submitted: auto-generated
- References: <bug-66930-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66930
--- Comment #13 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Kazumoto Kojima from comment #12)
>
> --- a/config/sh/sh-protos.h
> +++ b/config/sh/sh-protos.h
> @@ -198,7 +198,7 @@ sh_find_set_of_reg (rtx reg, rtx_insn* insn, F stepfunc,
> {
> if (BARRIER_P (result.insn))
> break;
> - if (!NONJUMP_INSN_P (result.insn))
> + if (!NONJUMP_INSN_P (result.insn) && !CALL_P (result.insn))
> continue;
> if (reg_set_p (reg, result.insn))
> {
>
> and it works like as my expectation, though I'm not sure whether it's
> a "right thing" or not.
This would be OK for hardregs (which are clobbered by calls). When working on
pseudos, it's actually OK to ignore calls. Maybe it'd be a good idea to extend
sh_find_set_of_reg to check for call clobbered hardregs only. This will make
the function easier to use.