diff options
author | Roland McGrath <mcgrathr@google.com> | 2012-06-11 20:42:20 +0000 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2012-06-11 13:42:20 -0700 |
commit | a04739cb173e53b73d3b451d336d63bcb33f1566 (patch) | |
tree | c7ebdf0a44ddb7c9615aecb8bb202ff64ccf4157 /gcc/dwarf2out.c | |
parent | f9f472bd6a3080e0be5aed7c05f05c65abbf2fb2 (diff) | |
download | gcc-a04739cb173e53b73d3b451d336d63bcb33f1566.zip gcc-a04739cb173e53b73d3b451d336d63bcb33f1566.tar.gz gcc-a04739cb173e53b73d3b451d336d63bcb33f1566.tar.bz2 |
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.
From-SVN: r188398
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 6e4ab76..3fd51fd 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, |