Thank you for the bug report. I've confirmed this with gcc-linaro-4.7+bzr115016.
michaelh@crucis:~/linaro/bugs$ ~/linaro/gcc/build/4.7/install/bin/arm-linux-gnueabi-g++ -O1 -S bug1046999.cc bug1046999.cc: In function ‘void bug1046999()’: bug1046999.cc:12:1: error: insn does not satisfy its constraints:
(insn 117 116 48 2 (set (zero_extract:SI (reg/f:SI 13 sp) (const_int 16 [0x10]) (const_int 16 [0x10]))
(const_int 65535 [0xffff])) bug1046999.cc:3 348 {*arm_movtas_ze}
(nil)) bug1046999.cc:12:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403
The fault is introduced by bzr115014 and is caused by the new add pattern not handling a sp = rx + constant pattern, causing reload to turn this into a movw, movt, and add. The pattern above is the movt part.
The fault exists upstream as at svn191044. Could you report it in GCC bugzilla and record it against this ticket?
I've set this to high priority as it's an ICE with no work around.
Thank you for the bug report. I've confirmed this with gcc-linaro- 4.7+bzr115016.
michaelh@ crucis: ~/linaro/ bugs$ ~/linaro/ gcc/build/ 4.7/install/ bin/arm- linux-gnueabi- g++ -O1 -S bug1046999.cc
(const_ int 16 [0x10])
(const_ int 16 [0x10])) cse_simplify_ operands, at postreload.c:403
bug1046999.cc: In function ‘void bug1046999()’:
bug1046999.cc:12:1: error: insn does not satisfy its constraints:
(insn 117 116 48 2 (set (zero_extract:SI (reg/f:SI 13 sp)
(const_int 65535 [0xffff])) bug1046999.cc:3 348 {*arm_movtas_ze}
(nil))
bug1046999.cc:12:1: internal compiler error: in reload_
The fault is introduced by bzr115014 and is caused by the new add pattern not handling a sp = rx + constant pattern, causing reload to turn this into a movw, movt, and add. The pattern above is the movt part.
The fault exists upstream as at svn191044. Could you report it in GCC bugzilla and record it against this ticket?
I've set this to high priority as it's an ICE with no work around.