OSDN Git Service

PR debug/43299
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Mar 2010 18:54:25 +0000 (18:54 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Mar 2010 18:54:25 +0000 (18:54 +0000)
* dwarf2out.c (const_ok_for_output_1): Return 1 for UNSPECs.

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

gcc/ChangeLog
gcc/dwarf2out.c

index 105d366..dddf990 100644 (file)
@@ -1,6 +1,9 @@
 2010-03-09  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/43299
+       * dwarf2out.c (const_ok_for_output_1): Return 1 for UNSPECs.
+
+       PR debug/43299
        * var-tracking.c (adjust_sets): New function.
        (count_with_sets, add_with_sets): Use it.
        (get_adjusted_src): New inline function.
index 2595119..5aa9df4 100644 (file)
@@ -12826,6 +12826,22 @@ const_ok_for_output_1 (rtx *rtlp, void *data ATTRIBUTE_UNUSED)
 {
   rtx rtl = *rtlp;
 
+  if (GET_CODE (rtl) == UNSPEC)
+    {
+      /* 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));
+#endif
+      expansion_failed (NULL_TREE, rtl,
+                       "UNSPEC hasn't been delegitimized.\n");
+      return 1;
+    }
+
   if (GET_CODE (rtl) != SYMBOL_REF)
     return 0;