http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59826
Bug ID: 59826 Summary: ICE caused by mishandling PLD rtx on ARM cortex-m4 target Product: gcc Version: 4.8.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: terry.guo at arm dot com Created attachment 31840 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31840&action=edit case to reproduce the ICE When use upstream 4.8 gcc to compile attached case with command: "arm-none-eabi-gcc -mthumb -fprefetch-loop-arrays crash.c -O2 -S -mcpu=cortex-m4", we will get ICE: crash.c: In function 'genxScrubText': crash.c:32:1: internal compiler error: in reg_overlap_mentioned_p, at rtlanal.c:1469 } ^ The option -fprefetch-loop-arrays causes gcc to generate rtx for ARM PLD instruction like: (insn 99 100 105 10 (prefetch (plus:SI (reg/v/f:SI 3 r3 [orig:143 last ] [143]) (const_int 34 [0x22])) (const_int 0 [0]) (const_int 3 [0x3])) 343 {prefetch} (nil)) When check data dependencies between this rtx and others, gcc mishandles it as a normal SET rtx and thus end up with ICE. Trunk gcc hasn't such issue due to code improvement at http://gcc.gnu.org/ml/gcc-patches/2013-11/msg00533.html.