<div dir="ltr"><div>I am not sure what's going on with the trunk clang at this moment.</div><div><br></div><div>$ cat a.cpp</div><div>#include <iostream></div><div>int main() {</div><div>}</div><div><br></div>$ clang++ -std=c++11 -fopenmp -fopenmp-targets=nvptx64 a.cpp<br>In file included from a.cpp:1:<br>In file included from /gpfs/software/opt/gcc/7.2.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.2.0/../../../../include/c++/7.2.0/iostream:39:<br>In file included from /gpfs/software/opt/gcc/7.2.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.2.0/../../../../include/c++/7.2.0/ostream:38:<br>In file included from /gpfs/software/opt/gcc/7.2.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.2.0/../../../../include/c++/7.2.0/ios:42:<br>In file included from /gpfs/software/opt/gcc/7.2.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/ios_base.h:41:<br>In file included from /gpfs/software/opt/gcc/7.2.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/locale_classes.h:40:<br>In file included from /gpfs/software/opt/gcc/7.2.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.2.0/../../../../include/c++/7.2.0/string:52:<br>In file included from /gpfs/software/opt/gcc/7.2.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/basic_string.h:6159:<br>In file included from /gpfs/software/opt/gcc/7.2.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.2.0/../../../../include/c++/7.2.0/ext/string_conversions.h:41:<br>In file included from /gpfs/software/opt/gcc/7.2.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.2.0/../../../../include/c++/7.2.0/cstdlib:77:<br>/gpfs/software/opt/gcc/7.2.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/std_abs.h:70:3: error: declaration conflicts with target of using declaration already in scope<br>  abs(double __x)<br>  ^<br>/p/scratch/cpcp0/pcp0151/opt/clang/201911040249/lib/clang/10.0.0/include/__clang_cuda_math_forward_declares.h:50:25: note: target of using declaration<br>__DEVICE__ const double abs(const double);<br>                        ^<br>/gpfs/software/opt/gcc/7.2.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/std_abs.h:52:11: note: using declaration<br>  using ::abs;<br>          ^<br>/gpfs/software/opt/gcc/7.2.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/std_abs.h:74:3: error: declaration conflicts with target of using declaration already in scope<br>  abs(float __x)<br>  ^<br>/p/scratch/cpcp0/pcp0151/opt/clang/201911040249/lib/clang/10.0.0/include/__clang_cuda_math_forward_declares.h:51:24: note: target of using declaration<br>__DEVICE__ const float abs(const float);<br>                       ^<br>/gpfs/software/opt/gcc/7.2.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/std_abs.h:52:11: note: using declaration<br>  using ::abs;<br>          ^<br>2 errors generated.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 3, 2019 at 4:29 PM Itaru Kitayama <<a href="mailto:itaru.kitayama@gmail.com">itaru.kitayama@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Building my app with trunk Clang with appropriate offloading flags fails:<div><br></div><div>[ 32%] Building CXX object nestkernel/CMakeFiles/nestkernel.dir/archiving_node.cpp.o<br>In file included from /p/project/cpcp0/pcp0151/projects/nest-simulator/nestkernel/archiving_node.cpp:30:<br>In file included from /p/project/cpcp0/pcp0151/projects/nest-simulator/nestkernel/archiving_node.h:40:<br>/p/project/cpcp0/pcp0151/projects/nest-simulator/nestkernel/nest_time.h:127:10: error: call to 'abs' is ambiguous<br>  return std::abs( n );<br>         ^~~~~~~~<br>/p/project/cpcp0/pcp0151/projects/nest-simulator/nestkernel/nest_time.h:312:15: note: in instantiation of function template specialization 'nest::time_abs<long>' requested here<br>    : tics( ( time_abs( t.t ) < LIM_MAX.steps )<br>              ^<br>/usr/include/stdlib.h:770:12: note: candidate function<br>extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;<br>           ^<br>/p/scratch/cpcp0/pcp0151/opt/clang/201911030759/lib/clang/10.0.0/include/__clang_cuda_cmath.h:56:24: note: candidate function<br>__DEVICE__ const float abs(const float __x) { return ::fabsf((float)__x); }<br>                       ^<br>/p/scratch/cpcp0/pcp0151/opt/clang/201911030759/lib/clang/10.0.0/include/__clang_cuda_cmath.h:57:25: note: candidate function<br>__DEVICE__ const double abs(const double __x) { return ::fabs((double)__x); }<br>                        ^<br>1 error generated.<br>make[2]: *** [nestkernel/CMakeFiles/nestkernel.dir/archiving_node.cpp.o] Error 1<br>make[1]: *** [nestkernel/CMakeFiles/nestkernel.dir/all] Error 2<br>make: *** [all] Error 2<br></div><div><br></div><div>please note that without those offloading flags build as expected succeeds.</div><div><br></div></div>
</blockquote></div>