https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63815
Uroš Bizjak <ubizjak at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Target|x86_64-apple-darwin14 |x86_64 CC| |enkovich.gnu at gmail dot com Host|x86_64-apple-darwin14 | Build|x86_64-apple-darwin14 | --- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> --- This ICE can be seen in [1] as FAIL: g++.dg/other/pr53811.C on Darwin, but can be triggered also on x86_64 linux with -mcmodel=large -fpic The problem starts in x86_output_mi_thunk, where we have: if (ix86_cmodel == CM_LARGE_PIC && SYMBOLIC_CONST (fnaddr)) fnaddr = legitimize_pic_address (fnaddr, gen_rtx_REG (Pmode, tmp_regno)); and legitimize_pic_address does: 13537 if (reg != 0) 13538 { 13539 new_rtx = expand_simple_binop (Pmode, PLUS, reg, pic_offset_table_rtx, 13540 tmpreg, 1, OPTAB_DIRECT); 13541 new_rtx = reg; 13542 } Please note that x86_output_mi_thunk runs after reload, and the above code emits RTX with a pseudo pic_offset_table_rtx register. [1] https://gcc.gnu.org/ml/gcc-testresults/2014-11/msg01024.html