]> 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)
committerAndrew Stubbs <ams@codesourcery.com>
Sat, 16 Jan 2021 15:37:01 +0000 (15:37 +0000)
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.c (gen_subprogram_die): Check offload attributes only.

gcc/dwarf2out.c

index dedfeaf865f2dc0cfcd334b7042f8e21f6073619..61d8a3f574cb1fff77b02f71c779640461fcf03b 100644 (file)
@@ -23094,9 +23094,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))