<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 - incorrect diagnose of user-defined reduction declared in namespace"
   href="https://bugs.llvm.org/show_bug.cgi?id=38902">38902</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>incorrect diagnose of user-defined reduction declared in namespace
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>OpenMP
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Clang Compiler Support
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>kli@ca.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>a.bataev@hotmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>template <typename T>
void bar(T &x, T &y) { x.a += y.a; }

namespace N1
{
  struct A { int a; A() : a(0) {} };
  #pragma omp declare reduction(+: A : bar(omp_out, omp_in))
};

int main ()
{
  N1::A a;
//  A a;
  #pragma omp parallel reduction(+: a)
  {
  }
}

$ clang++ -fopenmp d2a.cpp
d2a.cpp:15:34: error: invalid operands to binary expression ('N1::A' and
'N1::A')
  #pragma omp parallel reduction(+: a)
                                 ^  ~
1 error generated.</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>