[llvm-bugs] [Bug 51752] New: spurious "used "here" note diagnostics for __clang_cuda_device_functions.h
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Sep 4 13:45:52 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51752
Bug ID: 51752
Summary: spurious "used "here" note diagnostics for
__clang_cuda_device_functions.h
Product: OpenMP
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Clang Compiler Support
Assignee: unassignedclangbugs at nondot.org
Reporter: jdenny.ornl at gmail.com
CC: a.bataev at hotmail.com, jdoerfert at anl.gov,
llvm-bugs at lists.llvm.org
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.
```
--
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/20210904/5fef3739/attachment.html>
More information about the llvm-bugs
mailing list