Created attachment 28414 [details] preprocessed source seen on arm-linux-gnueabi, works with the 4.6 branch, fails with the 4.7 branch: $ g++-4.7 -c -g cluster.ii cluster.cc: In member function 'bool rpc::node::set_role(rpc::role_type)': cluster.cc:88:1: error: unrecognizable insn: (insn 16 15 17 3 (parallel [ (set (reg:CC_Z 24 cc) (unspec_volatile:CC_Z [ (const_int 0 [0]) ] VUNSPEC_ATOMIC_CAS)) (set (reg:SI 146) (zero_extend:SI (mem/v:HI (reg/f:SI 134 [ D.146641 ]) [-1 S2 A16]))) (set (mem/v:HI (reg/f:SI 134 [ D.146641 ]) [-1 S2 A16]) (unspec_volatile:HI [ (reg:HI 147) (subreg/s/u:HI (reg:SI 135 [ D.146642 ]) 0) (const_int 0 [0]) (const_int 5 [0x5]) (const_int 5 [0x5]) ] VUNSPEC_ATOMIC_CAS)) (clobber (scratch:SI)) ]) cluster.cc:87 -1 (nil)) cluster.cc:88:1: internal compiler error: in extract_insn, at recog.c:2123 Please submit a full bug report,
I can reproduce the ICE with g++ 4.8-20121007 and 4.7-20121006, on arm-linux-gnueabi with -march=armv7-a; with -march=armv6 or armv5te it doesn't ICE. The preprocessed source doesn't compile with g++ 4.6 so I can't check there.
The ICE started with Richard Henderson's "[ARM] Convert to atomic optabs" patch in r183050: http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00288.html http://gcc.gnu.org/ml/gcc-cvs/2012-01/msg00290.html
Author: xguo Date: Fri Oct 19 09:24:39 2012 New Revision: 192609 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192609 Log: gcc/ChangeLog PR target/54892 * config/arm/arm.c (arm_expand_compare_and_swap): Use SImode to make sure the mode is correct when falling through from above cases. gcc/testsuite/ChangeLog PR target/54892 * gcc.target/arm/pr54892.c: New. Added: trunk/gcc/testsuite/gcc.target/arm/pr54892.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/arm/arm.c trunk/gcc/testsuite/ChangeLog
Author: xguo Date: Fri Oct 19 09:39:13 2012 New Revision: 192610 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192610 Log: gcc/ChangeLog Backported from mainline 2012-10-19 Zhenqiang Chen <zhenqiang.chen@linaro.org> PR target/54892 * config/arm/arm.c (arm_expand_compare_and_swap): Use SImode to make sure the mode is correct when falling through from above cases. gcc/testsuite/ChangeLog Backported from mainline 2012-10-19 Zhenqiang Chen <zhenqiang.chen@linaro.org> PR target/54892 * gcc.target/arm/pr54892.c: New. Added: branches/gcc-4_7-branch/gcc/testsuite/gcc.target/arm/pr54892.c Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/config/arm/arm.c branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
Assuming fixed.