OSDN Git Service

PR target/45870
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 19 Nov 2010 07:22:22 +0000 (07:22 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 19 Nov 2010 07:22:22 +0000 (07:22 +0000)
* dwarf2out.c (const_ok_for_output_1): Don't complain about
non-delegitimized TLS UNSPECs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166932 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/dwarf2out.c

index 2016390..66ca884 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-19  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/45870
+       * dwarf2out.c (const_ok_for_output_1): Don't complain about
+       non-delegitimized TLS UNSPECs.
+
 2010-11-18  Jack Howarth  <howarth@bromo.med.uc.edu>
            Ian Lance Taylor  <iant@google.com>
 
index ea3852e..3285dac 100644 (file)
@@ -13503,11 +13503,18 @@ const_ok_for_output_1 (rtx *rtlp, void *data ATTRIBUTE_UNUSED)
       /* If delegitimize_address couldn't do anything with the UNSPEC, assume
         we can't express it in the debug info.  */
 #ifdef ENABLE_CHECKING
-      inform (current_function_decl
-             ? DECL_SOURCE_LOCATION (current_function_decl)
-             : UNKNOWN_LOCATION,
-             "non-delegitimized UNSPEC %d found in variable location",
-             XINT (rtl, 1));
+      /* Don't complain about TLS UNSPECs, those are just too hard to
+        delegitimize.  */
+      if (XVECLEN (rtl, 0) != 1
+         || 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))))
+       inform (current_function_decl
+               ? DECL_SOURCE_LOCATION (current_function_decl)
+               : UNKNOWN_LOCATION,
+               "non-delegitimized UNSPEC %d found in variable location",
+               XINT (rtl, 1));
 #endif
       expansion_failed (NULL_TREE, rtl,
                        "UNSPEC hasn't been delegitimized.\n");