public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/105082] New: [OpenMP] [RFC] Add warning like LLVM's "declaration marked as declare target after first use, it may lead to incorrect results [-Wopenmp-target]" ?
@ 2022-03-28 13:31 burnus at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: burnus at gcc dot gnu.org @ 2022-03-28 13:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105082
Bug ID: 105082
Summary: [OpenMP] [RFC] Add warning like LLVM's "declaration
marked as declare target after first use, it may lead
to incorrect results [-Wopenmp-target]" ?
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: diagnostic, openmp
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Target Milestone: ---
According to https://github.com/SOLLVE/sollve_vv/issues/506 , LLVM has the
following '-Wopenmp-target' warning.
RFC: Add a similar warning to warn_omp_declare_target_after_first_use ?
(
https://github.com/llvm/llvm-project/commit/729e242a7972f4802f982a4b4dabb964aa299675
)
warning: declaration marked as declare target after first use, it may lead to
incorrect results [-Wopenmp-target]
#pragma omp declare target link(a,b,c,i)
for code like:
int a[N], b[N], c[N];
int i = 0;
void update() {
for (i = 0; i < N; i++) {
a[i] += 1;
b[i] += 2;
c[i] += 3;
}
}
#pragma omp declare target
#pragma omp declare target link(a,b,c,i)
#pragma omp declare target to(update)
#pragma omp end declare target
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-28 13:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28 13:31 [Bug middle-end/105082] New: [OpenMP] [RFC] Add warning like LLVM's "declaration marked as declare target after first use, it may lead to incorrect results [-Wopenmp-target]" ? burnus at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).