Bug 37436 - arm-cross-g++. internal compiler error: in extract_insn, at recog.c:1990
Summary: arm-cross-g++. internal compiler error: in extract_insn, at recog.c:1990
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.2
: P2 normal
Target Milestone: 4.4.0
Assignee: Ramana Radhakrishnan
Keywords: ice-on-valid-code
: 36415 36920 (view as bug list)
Depends on:
Reported: 2008-09-08 23:39 UTC by Wei Zhong
Modified: 2014-03-21 08:46 UTC (History)
6 users (show)

See Also:
Host: x86_64-linux-gnu
Target: arm-brcm-linux-gnueabi
Build: x86_64-linux-gnu
Known to work:
Known to fail: 4.4.0
Last reconfirmed: 2009-09-18 21:30:22

generated by adding -save-temps (42.47 KB, text/x-c++src)
2008-09-08 23:41 UTC, Wei Zhong
generated by adding -save-temps (12.73 KB, application/octet-stream)
2008-09-08 23:42 UTC, Wei Zhong

Note You need to log in before you can comment on or make changes to this bug.
Description Wei Zhong 2008-09-08 23:39:22 UTC
gcc-4.3.2 http://ftp.gnu.org/gnu/gcc/gcc-4.3.2/gcc-4.3.2.tar.bz2

system type:
host - x86_64-linux-gnu
target - arm-brcm-linux-gnueabi 

Using built-in specs.
Target: arm-brcm-linux-gnueabi
Configured with: /projects/svm_users/weizhong/buildroot_armv7_1/config/20080513/le_arm11_external/../../../external/src/gcc-4.3.2/configure --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-brcm-linux-gnueabi --prefix=/projects/svm_users/weizhong/buildroot_armv7_1/config/20080513/le_arm11_external/../../../external/arm-brcm-linux-gnueabi/build --with-sysroot=/projects/svm_users/weizhong/buildroot_armv7_1/config/20080513/le_arm11_external/../../../external/arm-brcm-linux-gnueabi/build/sysroot --enable-shared --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --with-gnu-as --enable-threads --disable-libssp --disable-libgomp --disable-libmudflap --enable-languages=c,c++ --with-float=soft --with-gmp=/projects/svm_users/weizhong/buildroot_armv7_1/config/20080513/le_arm11_external/../../../external/arm-brcm-linux-gnueabi/build/gmp --with-mpfr=/projects/svm_users/weizhong/buildroot_armv7_1/config/20080513/le_arm11_external/../../../external/arm-brcm-linux-gnueabi/build/mpfr
Thread model: posix
gcc version 4.3.2 (GCC)

arm-brcm-linux-gnueabi-g++ -D_REENTRANT -I. -I../common -DU_I18N_IMPLEMENTATION -g -O2 -fvisibility=hidden -c -DPIC -fPIC -o rematch.o rematch.cpp

ll rematch.cpp: In member function 'void icu_3_8::RegexMatcher::MatchAt(int32_t, UErrorCode&)':
rematch.cpp:2290: error: unrecognizable insn:
(insn 4205 1393 1395 183 rematch.cpp:1462 (set (reg:SI 12 ip)
        (plus:SI (reg:SI 3 r3 [971])
            (mult:SI (reg/v:SI 14 lr [orig:254 opValue.2027 ] [254])
                (const_int 32 [0x20])))) -1 (nil))
rematch.cpp:2290: internal compiler error: in extract_insn, at recog.c:1990
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Wei Zhong 2008-09-08 23:41:39 UTC
Created attachment 16260 [details]
generated by adding -save-temps
Comment 2 Wei Zhong 2008-09-08 23:42:03 UTC
Created attachment 16261 [details]
generated by adding -save-temps
Comment 3 Richard Earnshaw 2008-12-10 15:10:56 UTC
Confirmed.  Still present on trunk.
Comment 4 Richard Earnshaw 2008-12-10 15:38:17 UTC
Some notes on the failure path:

combine generates the pattern
(insn 1466 1464 1467 192 regeximp.h:320 (set (reg:SI 1002)
        (sign_extend:SI (mem/s/j:QI (plus:SI (reg:SI 1000)
                    (mult:SI (reg/v:SI 246 [ opValue.1977 ])
                        (const_int 32 [0x20])))

[note the address in the mem is not in canonical form]
Register allocation realises that a scaled register is not permitted for a sign_extend(mem()) operation and splits the entire sub-expression into a separate insn.  However, because that insn is not in canonical form, it then fails to recognize the result.
Comment 5 Richard Earnshaw 2008-12-16 12:04:43 UTC
Subject: Bug 37436

Author: rearnsha
Date: Tue Dec 16 12:03:41 2008
New Revision: 142778

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142778
PR target/37436
* arm.c (arm_legitimate_index): Only accept addresses that are in
canonical form.
* predicates.md (arm_reg_or_extendqisi_mem_op): New predicate.
* arm.md (extendqihi2): Use arm_reg_or_extendqisi_mem_op predicate
for operand1.
(extendqisi2): Likewise.
(arm_extendqisi, arm_extendqisi_v6): Use arm_extendqisi_mem_op
predicate for operand1.


Comment 6 Richard Earnshaw 2008-12-16 12:12:12 UTC
Fixed on trunk
Comment 7 Ramana Radhakrishnan 2009-03-30 18:35:46 UTC
*** Bug 36415 has been marked as a duplicate of this bug. ***
Comment 8 Ramana Radhakrishnan 2009-03-30 18:36:32 UTC
This still exists for the 4.3 branch. Hence reopening.
Comment 9 Ramana Radhakrishnan 2009-04-29 15:53:56 UTC
*** Bug 36920 has been marked as a duplicate of this bug. ***
Comment 10 Richard Biener 2009-08-04 12:29:28 UTC
GCC 4.3.4 is being released, adjusting target milestone.
Comment 11 Ramana Radhakrishnan 2009-09-18 21:30:22 UTC
Mine - I'm testing a backport.
Comment 12 Richard Biener 2010-05-22 18:12:37 UTC
GCC 4.3.5 is being released, adjusting target milestone.
Comment 13 Ramana Radhakrishnan 2014-03-21 08:46:40 UTC
4.3 branch is closed and looks like my backport never made it. Closing this out as it got fixed in a 4.4.0 release I suspect