aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2022-07-07 15:11:03 +0200
committerThomas Schwinge <thomas@codesourcery.com>2022-07-08 08:53:58 +0200
commitfaa0c328ee65f0d6d65d6e20181d26e336071919 (patch)
tree7a3b18b3b057863c05ee37c215abb14fd3d302db /gcc
parent13f44099bcc64ddb50a6dbd462bf79b258dfd02c (diff)
downloadgcc-faa0c328ee65f0d6d65d6e20181d26e336071919.zip
gcc-faa0c328ee65f0d6d65d6e20181d26e336071919.tar.gz
gcc-faa0c328ee65f0d6d65d6e20181d26e336071919.tar.bz2
Fix one issue in OpenMP 'requires' directive diagnostics
Fix-up for recent commit 683f11843974f0bdf42f79cdcbb0c2b43c7b81b0 "OpenMP: Move omp requires checks to libgomp". gcc/ * lto-cgraph.cc (input_offload_tables) <LTO_symtab_edge>: Correct 'fn2' computation. libgomp/ * testsuite/libgomp.c-c++-common/requires-1.c: Add 'dg-note's. * testsuite/libgomp.c-c++-common/requires-2.c: Likewise. * testsuite/libgomp.c-c++-common/requires-3.c: Likewise. * testsuite/libgomp.c-c++-common/requires-7.c: Likewise. * testsuite/libgomp.fortran/requires-1.f90: Likewise.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/lto-cgraph.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/lto-cgraph.cc b/gcc/lto-cgraph.cc
index 4862965..6d9c36e 100644
--- a/gcc/lto-cgraph.cc
+++ b/gcc/lto-cgraph.cc
@@ -1879,7 +1879,7 @@ input_offload_tables (bool do_force_output)
&& TREE_CODE (tmp_decl) != TRANSLATION_UNIT_DECL)
tmp_decl = DECL_CONTEXT (tmp_decl);
if (tmp_decl != NULL_TREE)
- fn2 = IDENTIFIER_POINTER (DECL_NAME (requires_decl));
+ fn2 = IDENTIFIER_POINTER (DECL_NAME (tmp_decl));
}
char buf1[sizeof ("unified_address, unified_shared_memory, "