Bug 35311 - [4.2 only] ICE at postreload.c:392 while building webkit on s390
Summary: [4.2 only] ICE at postreload.c:392 while building webkit on s390
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.2.3
: P3 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-23 12:50 UTC by Josselin Mouette
Modified: 2009-03-31 20:20 UTC (History)
4 users (show)

See Also:
Host: s390-linux-gnu
Target: s390-linux-gnu
Build: s390-linux-gnu
Known to work: 4.3.0
Known to fail: 4.2.5
Last reconfirmed: 2008-02-25 09:05:09


Attachments
First test case (fails with -O2) (85.52 KB, application/octet-stream)
2008-02-23 12:52 UTC, Josselin Mouette
Details
Second test case (fails with -O1) (78.76 KB, application/octet-stream)
2008-02-23 12:52 UTC, Josselin Mouette
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josselin Mouette 2008-02-23 12:50:40 UTC
Also reported as http://bugs.debian.org/466613

An ICE appeared twice while trying to build webkit on s390. The first file fails to build with -O2 but is OK with -O1, for the second file it is just the opposite.

$ gcc -v
Using built-in specs.
Target: s390-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --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.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libmudflap --with-long-double-128 --enable-checking=release --build=s390-linux-gnu --host=s390-linux-gnu --target=s390-linux-gnu
Thread model: posix
gcc version 4.2.3 (Debian 4.2.3-1)


$ g++ -c -O2 regexp_object.ii 
../../../JavaScriptCore/kjs/regexp_object.cpp: In member function ‘KJS::JSObject* KJS::RegExpObjectImp::arrayOfMatches(KJS::ExecState*) const’:
../../../JavaScriptCore/kjs/regexp_object.cpp:333: error: insn does not satisfy its constraints:
(insn 532 533 160 16 (set (reg:SI 2 %r2)
        (const_int -1146241297 [0xffffffffbbadbeef])) 56 {*movsi_esa} (nil)
    (nil))
../../../JavaScriptCore/kjs/regexp_object.cpp:333: internal compiler error: in reload_cse_simplify_operands, at postreload.c:392
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.

$ g++ -c -O1 regexp_object.ii
=> OK

$ g++ -c -O1 debugger.ii
../../../JavaScriptCore/wtf/HashTable.h: In member function ‘void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::rehash(int) [with Key = int, Value = std::pair<int, KJS::ProtectedPtr<KJS::JSValue> >, Extractor = WTF::PairFirstExtractor<std::pair<int, KJS::ProtectedPtr<KJS::JSValue> > >, HashFunctions = WTF::IntHash<int>, Traits = WTF::PairHashTraits<WTF::HashTraits<int>, WTF::HashTraits<KJS::ProtectedPtr<KJS::JSValue> > >, KeyTraits = WTF::HashTraits<int>]’:
../../../JavaScriptCore/wtf/HashTable.h:856: error: insn does not satisfy its constraints:
(insn 796 797 58 7 (set (reg:SI 2 %r2)
        (const_int -1146241297 [0xffffffffbbadbeef])) 56 {*movsi_esa} (nil)
    (nil))
../../../JavaScriptCore/wtf/HashTable.h:856: internal compiler error: in reload_cse_simplify_operands, at postreload.c:392
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.

$ g++ -c -O2 debugger.ii
==> OK
Comment 1 Josselin Mouette 2008-02-23 12:52:01 UTC
Created attachment 15212 [details]
First test case (fails with -O2)
Comment 2 Josselin Mouette 2008-02-23 12:52:50 UTC
Created attachment 15213 [details]
Second test case (fails with -O1)
Comment 3 Andreas Krebbel 2008-02-25 09:05:08 UTC
This problem has already been fixed for GCC 4.3 (#34641). The testcase from that PR didn't fail for GCC 4.2 so I didn't apply the patch on 4.2 as well. But now the patch should be fine for 4.2. I've verified that it fixes your testcase.
Comment 4 Ulrich Weigand 2008-02-25 22:15:51 UTC
(In reply to comment #3)
> This problem has already been fixed for GCC 4.3 (#34641). The testcase from
> that PR didn't fail for GCC 4.2 so I didn't apply the patch on 4.2 as well. But
> now the patch should be fine for 4.2. I've verified that it fixes your
> testcase.

I agree this patch should go into 4.2 as well.
Comment 5 Andrew Pinski 2008-12-29 06:36:25 UTC
Note the 4.2 branch is closing soon.
Comment 6 Joseph S. Myers 2009-03-31 20:20:33 UTC
Closing 4.2 branch, fixed for 4.3.