http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46250
Summary: ICE: in extract_insn, at recog.c:2110 (unrecognizable insn) with -fPIC -mcmodel=large and __thread variable Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz ----- testcase.c ----- __thread int i; void foo (void) { i = 0; } ---------------------- Compiler output: $ gcc -fPIC -mcmodel=large testcase.c testcase.c: In function 'foo': testcase.c:6:1: error: unrecognizable insn: (call_insn/u 5 4 6 3 (parallel [ (set (reg:DI 0 ax) (call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr")) [0 S1 A8]) (const_int 0 [0]))) (unspec:DI [ (symbol_ref:DI ("i") [flags 0x10] <var_decl 0x7f2bb3d6a000 i>) ] UNSPEC_TLS_GD) ]) testcase.c:5 -1 (expr_list:REG_EH_REGION (const_int -2147483648 [0xffffffff80000000]) (nil)) (nil)) testcase.c:6:1: internal compiler error: in extract_insn, at recog.c:2110 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Compiler output (4.2.4): $ gcc-4.2.4 -fPIC -mcmodel=large testcase.c testcase.c:1: sorry, unimplemented: code model large not supported in PIC mode testcase.c:1: error: code model 'large' not supported in the 64 bit mode Tested revisions: r166105 - crash 4.5.1, 4.4.5, 4.3.5 - crash 4.2.4 - unimplemented