Bug 43469 - [4.5 Regression] ICE trying to compile glibc for ARM thumb2
Summary: [4.5 Regression] ICE trying to compile glibc for ARM thumb2
Status: VERIFIED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: 4.5.0
Assignee: Richard Earnshaw
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2010-03-21 19:04 UTC by Siarhei Siamashka
Modified: 2010-04-03 15:18 UTC (History)
4 users (show)

See Also:
Host:
Target: armv7a-unknown-linux-gnueabi, arm-eabi
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-03-24 00:12:06


Attachments
localealias.i (37.07 KB, text/plain)
2010-03-21 19:05 UTC, Siarhei Siamashka
Details
Reduced testcase. (786 bytes, text/plain)
2010-03-22 09:11 UTC, Ramana Radhakrishnan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Siarhei Siamashka 2010-03-21 19:04:57 UTC
========= the exact version of GCC

Freshly checked out SVN trunk for gcc 4.5.0 (r157602)

========= the options given when GCC was configured/built;

--target=armv7a-unknown-linux-gnueabi --enable-languages=c --without-headers

========= the complete command line that triggers the bug;

armv7a-unknown-linux-gnueabi-gcc -mcpu=cortex-a8 -mthumb -O1 -c localealias.i

========= the compiler output (error messages, warnings, etc.);

localealias.c: In function ‘read_alias_file’:
localealias.c:362:1: error: unrecognizable insn:
(insn 863 209 212 7 ../include/ctype.h:30 (set (const:SI (unspec:SI [
                    (symbol_ref:SI ("__libc_tsd_CTYPE_B") [flags 0xe0] <var_decl 0xfff95204b40 __libc_tsd_CTYPE_B>)
                    (const_int 3 [0x3])
                    (const (unspec:SI [
                                (const_int 2 [0x2])
                            ] 21))
                    (const_int 4 [0x4])
                ] 20))
        (reg:SI 10 sl)) -1 (nil))
localealias.c:362:1: internal compiler error: in extract_insn, at recog.c:2097
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Siarhei Siamashka 2010-03-21 19:05:39 UTC
Created attachment 20152 [details]
localealias.i
Comment 2 Siarhei Siamashka 2010-03-21 19:07:31 UTC
works fine with gcc 4.4.3
Comment 3 Ramana Radhakrishnan 2010-03-22 09:11:40 UTC
Created attachment 20156 [details]
Reduced testcase.

Reduced testcase.
Comment 4 Richard Biener 2010-03-23 13:41:09 UTC
Not exactly a primary or secondary target.  CCing maintainer.
Comment 5 Thomas Schwinge 2010-03-23 14:14:37 UTC
Also got hit by this.
Comment 6 Siarhei Siamashka 2010-03-31 22:50:02 UTC
(In reply to comment #4)
> Not exactly a primary or secondary target.  CCing maintainer.

I have been trying to find a complete list of gcc primary and secondary targets with no luck so far. But at least this this post refers to 'arm-eabi' as a primary target: http://gcc.gnu.org/ml/gcc/2010-03/msg00175.html

This bug is also reproducible with 'arm-eabi' target triplet. Sorry for stating the obvious, but arm thumb2 support is getting pretty interesting nowadays and for example ubuntu is switching to it for the whole distro.
Comment 7 Steven Bosscher 2010-03-31 22:55:19 UTC
Primary/secondary targets are listed on http://gcc.gnu.org/gcc-4.5/criteria.html. That list should probably be clarified for GCC 4.6 to explain what arm-eabi means, exactly. It makes little sense to me, to make arm-eabi a primary target but dropping thumb2 bugs off the P1-P3 list.

Anyway, also reproducible on arm-eabi, so it should be >= P3 anyway.
Comment 8 Richard Earnshaw 2010-04-02 08:32:30 UTC
Subject: Bug 43469

Author: rearnsha
Date: Fri Apr  2 08:32:00 2010
New Revision: 157942

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157942
Log:
	PR target/43469
	* arm.c (legitimize_tls_address): Adjust call to 
	gen_tls_load_dot_plus_four.
	(arm_note_pic_base): New function.
	(arm_cannot_copy_insn_p): Use it.
	* thumb2.md (tls_load_dot_plus_four): Rework to avoid use of '+' in
	constraint.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/arm/arm.c
    trunk/gcc/config/arm/thumb2.md

Comment 9 Richard Earnshaw 2010-04-02 08:36:51 UTC
Fixed
Comment 10 Thomas Schwinge 2010-04-03 15:18:37 UTC
Confirmed.