Bug 36415

Summary: [4.3 Regression] internal compiler error: in extract_insn, at recog.c:1990
Product: gcc Reporter: Aurelien Jarno <aurelien>
Component: targetAssignee: Ramana Radhakrishnan <ramana>
Status: RESOLVED DUPLICATE    
Severity: normal CC: aurelien, ejb, gcc-bugs, laurent, pinskia, rearnsha
Priority: P2 Keywords: ice-on-valid-code
Version: 4.3.1   
Target Milestone: 4.3.4   
Host: arm-linux-gnueabi Target: arm-linux-gnueabi
Build: arm-linux-gnueabi Known to work: 4.4.0
Known to fail: 4.3.2 Last reconfirmed: 2009-03-30 17:11:29
Attachments: Reduced testcase

Description Aurelien Jarno 2008-06-02 05:09:10 UTC
gcc 4.3 fails to build the attached testcase with optimization levels above -O0. Note that the problem does not occur on arm oldabi, and that it doesn't exists in gcc 4.2

Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.0-5' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libssp --disable-sjlj-exceptions --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.3.1 20080523 (prerelease) (Debian 4.3.0-5)
Comment 1 Aurelien Jarno 2008-06-02 05:10:10 UTC
Created attachment 15711 [details]
Reduced testcase
Comment 2 Laurent GUERBY 2009-01-02 12:02:04 UTC
Confirmed on 4.3.2-1 Debian gnueabi

guerby@gcc50:~$ g++ -c -O1 pr36415.c 
pr36415.c:29: warning: inline function ‘const UChar* icu_3_4::UnicodeString::getBuffer() const’ used but never defined
pr36415.c: In member function ‘virtual UBool icu_3_4::RegexMatcher::find()’:
pr36415.c:128: error: unrecognizable insn:
(insn 70 41 42 3 pr36415.c:122 (set (reg:SI 0 r0)
        (plus:SI (reg:SI 3 r3 [156])
            (mult:SI (reg/v:SI 1 r1 [orig:138 opValue ] [138])
                (const_int 32 [0x20])))) -1 (nil))
pr36415.c:128: internal compiler error: in extract_insn, at recog.c:1990

But this compiles fine at -O0/1/2/3 on trunk rev 142808
Comment 3 Laurent GUERBY 2009-01-02 12:02:52 UTC
confirmed
Comment 4 Richard Earnshaw 2009-03-30 17:01:49 UTC
This is probably the same as target/37436.  However, that fix has not been back-ported to the 4.3 branch.
Comment 5 Ramana Radhakrishnan 2009-03-30 17:11:29 UTC
Assigning to self.
Comment 6 Ramana Radhakrishnan 2009-03-30 18:35:46 UTC
A run through the debugger shows it to be the same as #37436. A backport of the patch for #37436  fixes the ICE. Bootstrap and regression test under way. Hence marking this as a duplicate of the same and reopening that for 4.3 .

*** This bug has been marked as a duplicate of 37436 ***