]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Correct fix offload dwarf info
authorAndrew Stubbs <ams@codesourcery.com>
Sat, 16 Jan 2021 15:18:07 +0000 (15:18 +0000)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 21 Jun 2022 13:11:31 +0000 (14:11 +0100)
The previous patch wasn't quite right, apparently.  Somehow the behaviour
changed after another clean build?  This tweak fixes it.

This patch should be squashed with fdcb23540a2 to go to mainline.

gcc/ChangeLog:

* dwarf2out.cc (gen_subprogram_die): Check offload attributes only.

gcc/ChangeLog.omp
gcc/dwarf2out.cc

index 5f473611046727d128edcb36883b6a1794030ee6..b977f98af97902ab1ff476914a1434267c208327 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-16  Andrew Stubbs  <ams@codesourcery.com>
+
+       * dwarf2out.cc (gen_subprogram_die): Check offload attributes only.
+
 2021-01-15  Andrew Stubbs  <ams@codesourcery.com>
 
        * dwarf2out.cc (add_location_or_const_value_attribute): Set
index 50b5b1925b340b6d1c9f469721f99d2e14d63363..46e22c7eb91ca2162d0ee134518ef7f7a487d480 100644 (file)
@@ -23770,9 +23770,8 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
                will ignore the function and everything nested within unless
                we give it a notional code range (the values aren't
                important, as long as they are valid).  */
-            if (flag_generate_offload
-                && lookup_attribute ("omp target entrypoint",
-                                     DECL_ATTRIBUTES (decl))
+            if (lookup_attribute ("omp target entrypoint",
+                                  DECL_ATTRIBUTES (decl))
                 && subr_die->die_parent
                 && subr_die->die_parent->die_tag == DW_TAG_subprogram
                 && !get_AT_low_pc (subr_die->die_parent))