<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 - spurious "used "here" note diagnostics for __clang_cuda_device_functions.h"
   href="https://bugs.llvm.org/show_bug.cgi?id=51752">51752</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>spurious "used "here" note diagnostics for __clang_cuda_device_functions.h
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>OpenMP
          </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>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>jdenny.ornl@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>a.bataev@hotmail.com, jdoerfert@anl.gov, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I can reproduce this at least as recently as 1f9e437065ae and at least as early
as 04242bdca991.  The note diagnostics here do not make sense to me:

```
$ cat test.c
#include <assert.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
  assert(argc == 2);
  int i = atoi(argv[1]);
  return 0;
}
$ clang -fopenmp -fopenmp-targets=nvptx64 -Wunused-variable test.c
test.c:5:7: warning: unused variable 'i' [-Wunused-variable]
  int i = atoi(argv[1]);
      ^
1 warning generated.
test.c:5:7: warning: unused variable 'i' [-Wunused-variable]
  int i = atoi(argv[1]);
      ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:43:66:
note: used here
__DEVICE__ void __attribute__((overloadable)) __brkpt(int __a) { __brkpt(); }
                                                                 ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1189:10:
note: used here
  return __bool2mask(__vseteq2(__a, __b), 16);
         ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1189:22:
note: used here
  return __bool2mask(__vseteq2(__a, __b), 16);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1199:22:
note: used here
  return __bool2mask(__vseteq4(__a, __b), 8);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1209:22:
note: used here
  return __bool2mask(__vsetges2(__a, __b), 16);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1219:22:
note: used here
  return __bool2mask(__vsetges4(__a, __b), 8);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1229:22:
note: used here
  return __bool2mask(__vsetgeu2(__a, __b), 16);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1239:22:
note: used here
  return __bool2mask(__vsetgeu4(__a, __b), 8);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1249:22:
note: used here
  return __bool2mask(__vsetgts2(__a, __b), 16);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1259:22:
note: used here
  return __bool2mask(__vsetgts4(__a, __b), 8);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1269:22:
note: used here
  return __bool2mask(__vsetgtu2(__a, __b), 16);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1279:22:
note: used here
  return __bool2mask(__vsetgtu4(__a, __b), 8);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1289:22:
note: used here
  return __bool2mask(__vsetles2(__a, __b), 16);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1299:22:
note: used here
  return __bool2mask(__vsetles4(__a, __b), 8);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1309:22:
note: used here
  return __bool2mask(__vsetleu2(__a, __b), 16);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1319:22:
note: used here
  return __bool2mask(__vsetleu4(__a, __b), 8);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1329:22:
note: used here
  return __bool2mask(__vsetlts2(__a, __b), 16);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1339:22:
note: used here
  return __bool2mask(__vsetlts4(__a, __b), 8);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1349:22:
note: used here
  return __bool2mask(__vsetltu2(__a, __b), 16);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1359:22:
note: used here
  return __bool2mask(__vsetltu4(__a, __b), 8);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1369:22:
note: used here
  return __bool2mask(__vsetne2(__a, __b), 16);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1379:22:
note: used here
  return __bool2mask(__vsetne4(__a, __b), 8);
                     ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1399:21:
note: used here
    unsigned mask = __vcmpgts2(__a, __b);
                    ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1493:60:
note: used here
__DEVICE__ unsigned int __vneg2(unsigned int __a) { return __vsub2(0, __a); }
                                                           ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1502:60:
note: used here
__DEVICE__ unsigned int __vneg4(unsigned int __a) { return __vsub4(0, __a); }
                                                           ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1511:10:
note: used here
  return __vsubss2(0, __a);
         ^
/home/jdenny/ornl/llvm/llvm-mono-git/install/lib/clang/14.0.0/include/__clang_cuda_device_functions.h:1521:10:
note: used here
  return __vsubss4(0, __a);
         ^
1 warning 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>