diff options
author | Andrew Stubbs <ams@codesourcery.com> | 2021-01-16 15:18:07 +0000 |
---|---|---|
committer | Kwok Cheung Yeung <kcy@codesourcery.com> | 2022-06-21 14:11:31 +0100 |
commit | 353afd4ec8b7d72786b0a12ab78553acc3395c72 (patch) | |
tree | 3b0d74c570f216398dd2bafb2ab6016562c40b8a /gcc | |
parent | 037c0d9acde83f73f6babfc6cee1c4763ec63c57 (diff) | |
download | gcc-353afd4ec8b7d72786b0a12ab78553acc3395c72.zip gcc-353afd4ec8b7d72786b0a12ab78553acc3395c72.tar.gz gcc-353afd4ec8b7d72786b0a12ab78553acc3395c72.tar.bz2 |
Correct fix offload dwarf info
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog.omp | 4 | ||||
-rw-r--r-- | gcc/dwarf2out.cc | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp index 5f47361..b977f98 100644 --- a/gcc/ChangeLog.omp +++ b/gcc/ChangeLog.omp @@ -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 diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc index 50b5b19..46e22c7 100644 --- a/gcc/dwarf2out.cc +++ b/gcc/dwarf2out.cc @@ -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)) |