After Andi's patch we ICE on: $ gcc /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/torture/tls/run-ld.c -mforce-indirect-call /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/torture/tls/run-ld.c: In function ‘get_ld’: /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/torture/tls/run-ld.c:13:1: error: unrecognizable insn: } ^ (call_insn/u 5 2 6 2 (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 ("tls_ld") [flags 0x12] <var_decl 0x7f9b58913e10 tls_ld>) (reg/f:DI 7 sp) ] UNSPEC_TLS_GD) ]) "/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/torture/tls/run-ld.c":12 -1 (expr_list:REG_EH_REGION (const_int -2147483648 [0xffffffff80000000]) (nil)) (nil)) during RTL pass: vregs /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/torture/tls/run-ld.c:13:1: internal compiler error: in extract_insn, at recog.c:2305 0x5be174 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc/rtl-error.c:108 0x5be193 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc/rtl-error.c:116 0xb2d9af extract_insn(rtx_insn*) ../../gcc/recog.c:2305 0x8dae81 instantiate_virtual_regs_in_insn ../../gcc/function.c:1639 0x8dae81 instantiate_virtual_regs ../../gcc/function.c:1959 0x8dae81 execute ../../gcc/function.c:2008
I'm not sure why you call it a regression? You must be running the test suite manually with the new option. I haven't tested, but likely it will fail if you run that test with -mcmodel=large too. The -mforce-indirect-call patch is really only a subset of -mcmodel=large. Then it would be more a latent bug.
(In reply to Andi Kleen from comment #1) > I'm not sure why you call it a regression? You must be running the test > suite manually with the new option. Sorry, I was too eager ;) and did PRs for multiple different issues. It's very old, with -mcmodel=large, all releases I have are affected (4.5.0+).
GCC 8.1 has been released.
GCC 8.2 has been released.
GCC 8.3 has been released.
GCC 8.4.0 has been released, adjusting target milestone.
Even though PR 89289 is newer, it has more information on what is going wrong with -mforce-indirect-call . Also what is not mentioned here is dynamic model is needed to hit the issue (which is what -fPIC does too). *** This bug has been marked as a duplicate of bug 89289 ***