While building trunk -r171741 I get the following error on ARM machine configured with: ../gcc/configure --enable-checking --enable-languages=c,c++,lto,fortran --disable-bootstrap --with-mpfr=/opt/cfarm/mpfr-2.4.2 --with-gmp=/opt/cfarm/gmp-4.2.4 --with-mpc=/opt/cfarm/mpc-0.8 --with-arch=armv7-a /home/revitale/mainline/build/./gcc/xgcc -B/home/revitale/mainline/build/./gcc/ -B/home/revitale/mainline/build/armv7l-unknown-linux-gnueabi/bin/ -B/home/revitale/mainline/build/armv7l-unknown-linux-gnueabi/lib/ -isystem /home/revitale/mainline/build/armv7l-unknown-linux-gnueabi/include -isystem /home/revitale/mainline/build/armv7l-unknown-linux-gnueabi/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -Wno-missing-prototypes -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -I. -I. -I../.././gcc -I../../../gcc/libgcc -I../../../gcc/libgcc/. -I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include -DHAVE_CC_TLS -o _gcov.o -MT _gcov.o -MD -MP -MF _gcov.dep -DL_gcov -c ../../../gcc/libgcc/../gcc/libgcov.c ../../../gcc/libgcc/../gcc/libgcov.c: In function גgcov_exitג: ../../../gcc/libgcc/../gcc/libgcov.c:558:1: error: insn does not satisfy its constraints: (insn 2032 232 231 3 (set (reg:DI 256 [ this_program__sum_all_lsm.184 ]) (reg:DI 6 r6)) 165 {*arm_movdi} (nil)) ../../../gcc/libgcc/../gcc/libgcov.c:558:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. make[2]: *** [_gcov.o] Error 1 make[2]: Leaving directory `/home/revitale/mainline/build/armv7l-unknown-linux-gnueabi/libgcc' make[1]: *** [all-target-libgcc] Error 2 make[1]: Leaving directory `/home/revitale/mainline/build' make: *** [all] Error 2
Created attachment 23834 [details] Test inspired from libgcov.c Command to run the test on ARM machine: /home/revitale/mainline/build/./gcc/xgcc -B/home/revitale/mainline/build/./gcc/ -g -O2 -O2 -g -O2 k13.c
Here's another case which is probably the same problem. compile on an arm-eabi cross with cc1 -g -O2 -mfloat-abi=hard -std=gnu99 bad.c
Created attachment 23843 [details] testcase reduced from libgfortran
We have the following situation: - a pseudo has equivalent constant. - a loop allocno corresponding to the pseudo got hard reg and the subloop allocno got memory. - the load generated by IRA on the loop/subloop border is not removed. - the loop allocno is spilled in reload transforming the load into mem-mem move. - reload skip processing the move because it sets up regno with equiv constant. - gcc dies in the post=reload. There are several possible solutions but the most optimal would be removing the load transformed into mem-mem move in the reload. We need to add the load to equiv init insn. I'll submit a patch solving the problem soon.
Author: vmakarov Date: Mon Apr 4 20:19:45 2011 New Revision: 171951 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171951 Log: 2011-04-01 Vladimir Makarov <vmakarov@redhat.com> PR target/48380 * ira.c (ira): Call grow_reg_equivs when fix_reg_equiv_init is not called. * ira-emit.c (emit_move_list): Update reg equiv init insn list. Modified: trunk/gcc/ChangeLog trunk/gcc/ira-emit.c trunk/gcc/ira.c
Should be fixed by Vlad's patch.