This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/60606] ICE [ARM] error: insn does not satisfy its constraints
- From: "y.gribov at samsung dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 21 Mar 2014 09:10:39 +0000
- Subject: [Bug target/60606] ICE [ARM] error: insn does not satisfy its constraints
- Auto-submitted: auto-generated
- References: <bug-60606-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60606
Yury Gribov <y.gribov at samsung dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |y.gribov at samsung dot com
--- Comment #1 from Yury Gribov <y.gribov at samsung dot com> ---
(In reply to D.Salikhov from comment #0)
> Compile sample code in attachment by "arm-v7a9-linux-gnueabi-gcc -S ice.c"
For my 4.9 with --enable-checking this fails earlier during LRA:
tmp.c: In function 'alpha':
tmp.c:5:1: internal compiler error: in check_rtl, at lra.c:2070
}
^
0x9a3545 check_rtl
/home/ygribov/src/gcc-master/gcc/lra.c:2070
0x9a3fc7 lra(_IO_FILE*)
/home/ygribov/src/gcc-master/gcc/lra.c:2449
0x952374 do_reload
/home/ygribov/src/gcc-master/gcc/ira.c:5457
0x9526c2 rest_of_handle_reload
/home/ygribov/src/gcc-master/gcc/ira.c:5598
0x95270c execute
/home/ygribov/src/gcc-master/gcc/ira.c:5627
The problematic RTL seems to be
(insn 5 2 6 2 (set (reg:SI 3 r3 [orig:110 D.4140 ] [110])
(reg/v:SI 15 pc [ pc ])) tmp.c:4 663 {*arm_movsi_vfp}
(nil))
Indeed movsi patterns in arm.md does not allow pc in RHS:
(define_insn "*arm_movsi_insn"
[(set (match_operand:SI 0 "nonimmediate_operand" "=rk,r,r,r,rk,m")
(match_operand:SI 1 "general_operand" "rk, I,K,j,mi,rk"))]
I'm not sure whether this is a bug or a feature. As a workaround you could
simply do
register unsigned long pc;
asm("mov %0, pc" : "=r"(pc));