[llvm-bugs] [Bug 51678] New: (Accepts invalid?) No warning "not lvalue expression nor array section in 'depend' clause"
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 30 09:29:51 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51678
Bug ID: 51678
Summary: (Accepts invalid?) No warning "not lvalue expression
nor array section in 'depend' clause"
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: OpenMP
Assignee: unassignedclangbugs at nondot.org
Reporter: lebedev.ri at gmail.com
CC: llvm-bugs at lists.llvm.org
struct Inner {
int a, b;
};
struct Outer {
int c, d;
Inner k;
void bad();
void maybegood();
};
void callee(Inner &);
void Outer::bad() {
#pragma omp task depend(in : k)
callee(k);
}
void Outer::maybegood() {
#pragma omp task depend(in : this->k)
callee(k);
}
Gcc says:
<source>: In member function 'void Outer::bad()':
<source>:16:30: error: 'Outer::k' is not lvalue expression nor array section in
'depend' clause
16 | #pragma omp task depend(in : k)
| ^
Compiler returned: 1
(and does not complain on `maybegood()`).
Clang doesn't say anything.
Is this a clang bug or gcc one?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210830/6306be9b/attachment.html>
More information about the llvm-bugs
mailing list