This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/65729] [5 Regression] ICE (in prohibited_class_reg_set_mode_p, at lra-constraints.c) on arm-linux-gnueabihf
- From: "vmakarov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 10 Apr 2015 15:49:01 +0000
- Subject: [Bug target/65729] [5 Regression] ICE (in prohibited_class_reg_set_mode_p, at lra-constraints.c) on arm-linux-gnueabihf
- Auto-submitted: auto-generated
- References: <bug-65729-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65729
--- Comment #5 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Yvan Roux from comment #4)
> For me the assertion in prohibited_class_reg_set_mode_p is not right, it
> checks that set is a subset of reg_class_contents[rclass] and my
> understanding is that it should be the opposite:
>
> lra_assert (hard_reg_set_subset_p (reg_class_contents[rclass],set));
>
> With this modification the test is fixed (full validation is ongoing).
>
> Do I miss something Vlad ?
After some investigation done, I believe you are right, Yvan.
this_alternative_set is always not smaller than contents of this_alternative as
we use reg_class_subunion. So you can submit your patch with swapping
arguments in the assert call, of course after testing on x86-64 at least. I am
approving the patch. If you don't respond it in a few hours, I'll do it
myself. Thanks.
By the way, it is a bad practice for RA not define classes which are union of
classes can be used for the same operand. In this case, we could use
GENERAL_REGS or VFP_LO_REGS but only VFP_LO_REGS will be used only as it is a
result of reg_class_subunion[GENERAL_REGS][VFP_LO_REGS]. But fixing it is not
a task for GCC-5.0 as we are at the very end of creation of a new release.
Fixing RA bugs has a big chance introducing new ones until it is stabilized.
This is a situation what we actually see now.