diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-11 20:42:20 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-11 20:42:20 +0000 |
commit | 117f89758c3c73c5487b1a7275b2e458b583b802 (patch) | |
tree | c7ebdf0a44ddb7c9615aecb8bb202ff64ccf4157 /gcc/dwarf2out.c | |
parent | 6c1286fc549c3cfde8d29d82b59d75690a5acc2f (diff) | |
download | gcc-117f89758c3c73c5487b1a7275b2e458b583b802.tar.gz |
Roland McGrath <mcgrathr@google.com>
* dwarf2out.c (const_ok_for_output_1): Detect a TLS UNSPEC using
SYMBOL_REF_TLS_MODEL rather than DECL_THREAD_LOCAL_P, in case it's
not a VAR_DECL. Also don't limit it to UNSPECs with exactly one
operand.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188398 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 6e4ab761b75..3fd51fdb3b8 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10129,12 +10129,12 @@ const_ok_for_output_1 (rtx *rtlp, void *data ATTRIBUTE_UNUSED) we can't express it in the debug info. */ #ifdef ENABLE_CHECKING /* Don't complain about TLS UNSPECs, those are just too hard to - delegitimize. */ - if (XVECLEN (rtl, 0) != 1 + delegitimize. Note this could be a non-decl SYMBOL_REF such as + one in a constant pool entry, so testing SYMBOL_REF_TLS_MODEL + rather than DECL_THREAD_LOCAL_P is not just an optimization. */ + if (XVECLEN (rtl, 0) == 0 || GET_CODE (XVECEXP (rtl, 0, 0)) != SYMBOL_REF - || SYMBOL_REF_DECL (XVECEXP (rtl, 0, 0)) == NULL - || TREE_CODE (SYMBOL_REF_DECL (XVECEXP (rtl, 0, 0))) != VAR_DECL - || !DECL_THREAD_LOCAL_P (SYMBOL_REF_DECL (XVECEXP (rtl, 0, 0)))) + || SYMBOL_REF_TLS_MODEL (XVECEXP (rtl, 0, 0)) == TLS_MODEL_NONE) inform (current_function_decl ? DECL_SOURCE_LOCATION (current_function_decl) : UNKNOWN_LOCATION, |