<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - (Accepts invalid?) No warning "not lvalue expression nor array section in 'depend' clause""
   href="https://bugs.llvm.org/show_bug.cgi?id=51678">51678</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>(Accepts invalid?) No warning "not lvalue expression nor array section in 'depend' clause"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>OpenMP
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>lebedev.ri@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>