------- Comment #3 from krebbel at gcc dot gnu dot org 2008-07-07 12:35 ------- The shorter testcase does not fail with -O2 -fPIC on GCC rev. 137553.
But I can confirm the ICE with the first example. For large GOTs (>4k) we rewrite a symbol reference as a GOTENT relocation in the LEGITIMIZE_ADDRESS hook. A reference to the original SYM_REF stays as REG_EQUAL note. The note is used by GCSE to propagate the SYM_REF directly into the asm operand. So the legitimize_address hook is called for this operand during reload - since the fix needs an additional pseudo it crashes. -- krebbel at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |krebbel at gcc dot gnu dot |dot org |org Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2008-07-07 12:35:23 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36745