re PR target/26765 (ICE in in extract_insn with __thread and optimization)

gcc/
	PR target/26765
	* config/mips/mips.c (mips_symbolic_address_p): Return true
	for SYMBOL_TLSGD, SYMBOL_TLSLDM, SYMBOL_DTPREL, SYMBOL_TPREL,
	SYMBOL_GOTTPREL, and SYMBOL_TLS.

gcc/testsuite/
	PR target/26765
	* gcc.target/mips/pr26765.c: New.

From-SVN: r113536
This commit is contained in:
Kazu Hirata 2006-05-04 20:13:37 +00:00
parent b2ed63b4aa
commit 05431b8528
4 changed files with 31 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2006-05-04 Richard Sandiford <richard@codesourcery.com>
PR target/26765
* config/mips/mips.c (mips_symbolic_address_p): Return true
for SYMBOL_TLSGD, SYMBOL_TLSLDM, SYMBOL_DTPREL, SYMBOL_TPREL,
SYMBOL_GOTTPREL, and SYMBOL_TLS.
2006-05-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/14287

View File

@ -1463,18 +1463,16 @@ mips_symbolic_address_p (enum mips_symbol_type symbol_type,
/* The address will have to be loaded from the GOT first. */
return false;
case SYMBOL_TLSGD:
case SYMBOL_TLSLDM:
case SYMBOL_DTPREL:
case SYMBOL_TPREL:
case SYMBOL_GOTTPREL:
case SYMBOL_TLS:
return false;
case SYMBOL_GOTOFF_PAGE:
case SYMBOL_GOTOFF_GLOBAL:
case SYMBOL_GOTOFF_CALL:
case SYMBOL_GOTOFF_LOADGP:
case SYMBOL_TLS:
case SYMBOL_TLSGD:
case SYMBOL_TLSLDM:
case SYMBOL_DTPREL:
case SYMBOL_GOTTPREL:
case SYMBOL_TPREL:
case SYMBOL_64_HIGH:
case SYMBOL_64_MID:
case SYMBOL_64_LOW:

View File

@ -1,3 +1,8 @@
2006-05-04 Kazu Hirata <kazu@codesourcery.com>
PR target/26765
* gcc.target/mips/pr26765.c: New.
2005-05-04 Bernd Schmidt <bernd.schmidt@analog.com>
* gcc.target/bfin: New directory.

View File

@ -0,0 +1,13 @@
/* PR target/pr26765
This testcase used to trigger an unrecognizable insn. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
__thread int *a = 0;
void foo (void)
{
extern int *b;
b = (int *) ((*a));
}