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: unassignedclangb...@nondot.org
Reporter: lebedev...@gmail.com
CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs