public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/53023] New: file_table_last_lookup is used, but never set
@ 2012-04-17 20:16 hjl.tools at gmail dot com
  2012-04-17 20:21 ` [Bug debug/53023] " hjl.tools at gmail dot com
  2021-08-25 20:06 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: hjl.tools at gmail dot com @ 2012-04-17 20:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53023

             Bug #: 53023
           Summary: file_table_last_lookup is used, but never set
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com


[hjl@gnu-6 gcc]$ grep file_table_last_lookup dwarf2out.c
static GTY(()) struct dwarf_file_data * file_table_last_lookup;
  if (file_table_last_lookup
      && (file_name == file_table_last_lookup->filename
      || filename_cmp (file_table_last_lookup->filename, file_name) == 0))
    return file_table_last_lookup;
[hjl@gnu-6 gcc]$


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug debug/53023] file_table_last_lookup is used, but never set
  2012-04-17 20:16 [Bug debug/53023] New: file_table_last_lookup is used, but never set hjl.tools at gmail dot com
@ 2012-04-17 20:21 ` hjl.tools at gmail dot com
  2021-08-25 20:06 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: hjl.tools at gmail dot com @ 2012-04-17 20:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53023

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-04-17 20:19:34 UTC ---
This patch sets file_table_last_lookup:

diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 7e2ce58..d5783c2 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -20043,13 +20043,15 @@ lookup_filename (const char *file_name)
   /* Didn't match the previous lookup, search the table.  */
   slot = htab_find_slot_with_hash (file_table, file_name,
                    htab_hash_string (file_name), INSERT);
-  if (*slot)
-    return (struct dwarf_file_data *) *slot;
-
-  created = ggc_alloc_dwarf_file_data ();
-  created->filename = file_name;
-  created->emitted_number = 0;
-  *slot = created;
+  created = (struct dwarf_file_data *) *slot;
+  if (!created)
+    {
+      created = ggc_alloc_dwarf_file_data ();
+      created->filename = file_name;
+      created->emitted_number = 0;
+      *slot = created;
+    }
+  file_table_last_lookup = created;
   return created;
 }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug debug/53023] file_table_last_lookup is used, but never set
  2012-04-17 20:16 [Bug debug/53023] New: file_table_last_lookup is used, but never set hjl.tools at gmail dot com
  2012-04-17 20:21 ` [Bug debug/53023] " hjl.tools at gmail dot com
@ 2021-08-25 20:06 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-25 20:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53023

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
           Keywords|                            |internal-improvement
         Resolution|---                         |FIXED
   Target Milestone|---                         |6.0

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Removed in GCC 6 by r6-1401.
So fixed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-25 20:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-17 20:16 [Bug debug/53023] New: file_table_last_lookup is used, but never set hjl.tools at gmail dot com
2012-04-17 20:21 ` [Bug debug/53023] " hjl.tools at gmail dot com
2021-08-25 20:06 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).