]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2019-09-17 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Sep 2019 13:52:20 +0000 (13:52 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Sep 2019 13:52:20 +0000 (13:52 +0000)
PR debug/91772
* dwarf2out.c (dwarf2out_late_global_decl): If early dwarf
was missing generate locations only once.

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

gcc/ChangeLog
gcc/dwarf2out.c

index 0cbb512bb1d75c757987a262845760f271bda4df..6d03377480581fbcb20a0a044745b89dc4b5c368 100644 (file)
@@ -1,3 +1,9 @@
+2019-09-17  Richard Biener  <rguenther@suse.de>
+
+       PR debug/91772
+       * dwarf2out.c (dwarf2out_late_global_decl): If early dwarf
+       was missing generate locations only once.
+
 2019-09-17  Feng Xue  <fxue@os.amperecomputing.com>
 
        PR ipa/91089
index c359c2d4af981c930246f335fb5d8dcc05725abd..5698c82f7dfe3a397fb1a83d14307c0287931342 100644 (file)
@@ -26660,16 +26660,12 @@ dwarf2out_late_global_decl (tree decl)
     {
       dw_die_ref die = lookup_decl_die (decl);
 
-      /* We may have to generate early debug late for LTO in case debug
+      /* We may have to generate full debug late for LTO in case debug
          was not enabled at compile-time or the target doesn't support
         the LTO early debug scheme.  */
       if (! die && in_lto_p)
-       {
-         dwarf2out_decl (decl);
-         die = lookup_decl_die (decl);
-       }
-
-      if (die)
+       dwarf2out_decl (decl);
+      else if (die)
        {
          /* We get called via the symtab code invoking late_global_decl
             for symbols that are optimized out.