[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.
Justin Lebar via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 17 18:22:49 PDT 2016
jlebar added a comment.
> The tests should be runnable with lit. I generally just do an in-tree build and run make check-libcxx. @EricWF , what's the recommended way of running the tests from an out-of-tree build?
Things seem broken at the moment with clang from tip of tree.
I did a clean in-tree build and then modified the `config.cxx_under_test` line in projects/libcxx/test/lit.site.cfg to point to my newly-built clang. Running check-cxx gets tons of failing tests [1]. However, if I change that to point to my clang-3.8 binary, everything works fine, with and without this patch here.
So, issues with libc++ and current clang aside (I'm happy to file a bug somewhere?), this patch seems to pass the tests just fine.
Would be nice to get this in -- it's the only thing blocking me from turning on these tests in the test suite (and announcing full support for std::complex on the device).
[1] One example of a failing test:
********************
FAIL: libc++ :: std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp (732 of 5634)
******************** TEST 'libc++ :: std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp' FAILED ********************
Command: ['/usr/local/google/home/jlebar/llvm/release/bin/clang++', '-o', '/usr/local/google/home/jlebar/code/llvm/release/projects/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/Output/ctor_move.pass.cpp.o', '-x', 'c++', '/usr/local/google/home/jlebar/code/llvm/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp', '-c', '-v', '-Werror=thread-safety', '-std=c++1z', '-include', '/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/test/support/nasty_macros.hpp', '-nostdinc++', '-I/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include', '-D__STDC_FORMAT_MACROS', '-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-I/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/test/support', '-DLIBCXX_FILESYSTEM_STATIC_TEST_ROOT="/usr/local/google/home/jlebar/code/llvm/libcxx/test/std/experimental/filesystem/Inputs/static_test_env"', '-DLIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT="/usr/local/google/home/jlebar/code/llvm/release/projects/libcxx/test/filesystem/Output/dynamic_env"', '-DLIBCXX_FILESYSTEM_DYNAMIC_TEST_HELPER="/usr/bin/python2.7 /usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/test/support/filesystem_dynamic_test_helper.py"', '-c']
Exit Code: 1
Standard Error:
--
clang version 4.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/google/home/jlebar/llvm/release/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
Found CUDA installation: /usr/local/cuda, version 7.0
"/usr/local/google/home/jlebar/code/llvm/release/bin/clang-4.0" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name ctor_move.pass.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -v -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file /usr/local/google/home/jlebar/code/llvm/release/projects/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/Output/ctor_move.pass.cpp.gcno -nostdinc++ -resource-dir /usr/local/google/home/jlebar/code/llvm/release/bin/../lib/clang/4.0.0 -include /usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/test/support/nasty_macros.hpp -I /usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -I /usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/test/support -D "LIBCXX_FILESYSTEM_STATIC_TEST_ROOT=\"/usr/local/google/home/jlebar/code/llvm/libcxx/test/std/experimental/filesystem/Inputs/static_test_env\"" -D "LIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT=\"/usr/local/google/home/jlebar/code/llvm/release/projects/libcxx/test/filesystem/Output/dynamic_env\"" -D "LIBCXX_FILESYSTEM_DYNAMIC_TEST_HELPER=\"/usr/bin/python2.7 /usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/test/support/filesystem_dynamic_test_helper.py\"" -internal-isystem /usr/local/include -internal-isystem /usr/local/google/home/jlebar/code/llvm/release/bin/../lib/clang/4.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Werror=thread-safety -std=c++1z -fdeprecated-macro -fdebug-compilation-dir /usr/local/google/home/jlebar/code/llvm/release/projects/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o /usr/local/google/home/jlebar/code/llvm/release/projects/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/Output/ctor_move.pass.cpp.o -x c++ /usr/local/google/home/jlebar/code/llvm/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp
clang -cc1 version 4.0.0 based upon LLVM 4.0.0svn default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/test/support
/usr/local/include
/usr/local/google/home/jlebar/code/llvm/release/bin/../lib/clang/4.0.0/include
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
In file included from /usr/local/google/home/jlebar/code/llvm/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp:14:
In file included from /usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/queue:170:
In file included from /usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/deque:158:
In file included from /usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/__split_buffer:7:
In file included from /usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/algorithm:639:
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/utility:260:1: error: conflicting types for 'swap'
swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/type_traits:4381:1: note: previous declaration is here
swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value);
^
In file included from /usr/local/google/home/jlebar/code/llvm/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp:14:
In file included from /usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/queue:170:
In file included from /usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/deque:158:
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/__split_buffer:318:34: error: conflicting types for '__split_buffer<_Tp, _Allocator>'
__split_buffer<_Tp, _Allocator>::__split_buffer()
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/__split_buffer:60:5: note: previous declaration is here
__split_buffer()
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/__split_buffer:349:34: error: conflicting types for '__split_buffer<_Tp, _Allocator>'
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/__split_buffer:70:5: note: previous declaration is here
__split_buffer(__split_buffer&& __c)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/__split_buffer:390:34: error: conflicting types for 'operator='
__split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/__split_buffer:73:21: note: previous declaration is here
__split_buffer& operator=(__split_buffer&& __c)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/__split_buffer:412:34: error: conflicting types for 'swap'
__split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/__split_buffer:147:10: note: previous declaration is here
void swap(__split_buffer& __x)
^
In file included from /usr/local/google/home/jlebar/code/llvm/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp:14:
In file included from /usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/queue:170:
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/deque:1092:32: error: conflicting types for '__deque_base<_Tp, _Allocator>'
__deque_base<_Tp, _Allocator>::__deque_base()
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/deque:964:5: note: previous declaration is here
__deque_base()
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/deque:1114:32: error: conflicting types for '__deque_base<_Tp, _Allocator>'
__deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/deque:973:5: note: previous declaration is here
__deque_base(__deque_base&& __c)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/deque:1556:25: error: conflicting types for 'deque<_Tp, _Allocator>'
deque<_Tp, _Allocator>::deque(deque&& __c)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/deque:1246:5: note: previous declaration is here
deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value);
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/deque:1577:25: error: conflicting types for 'operator='
deque<_Tp, _Allocator>::operator=(deque&& __c)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/deque:1250:12: note: previous declaration is here
deque& operator=(deque&& __c)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/deque:1601:25: error: conflicting types for '__move_assign'
deque<_Tp, _Allocator>::__move_assign(deque& __c, true_type)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/deque:1455:10: note: previous declaration is here
void __move_assign(deque& __c, true_type)
^
In file included from /usr/local/google/home/jlebar/code/llvm/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp:14:
In file included from /usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/queue:171:
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/vector:422:33: error: conflicting types for '__vector_base<_Tp, _Allocator>'
__vector_base<_Tp, _Allocator>::__vector_base()
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/vector:355:5: note: previous declaration is here
__vector_base()
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/vector:1300:26: error: conflicting types for 'operator='
vector<_Tp, _Allocator>::operator=(vector&& __x)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/vector:557:13: note: previous declaration is here
vector& operator=(vector&& __x)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/vector:1324:26: error: conflicting types for '__move_assign'
vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/vector:782:10: note: previous declaration is here
void __move_assign(vector& __c, true_type)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/vector:2544:27: error: conflicting types for 'vector<bool, type-parameter-0-0>'
vector<bool, _Allocator>::vector()
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/vector:2162:5: note: previous declaration is here
vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/vector:2836:27: error: conflicting types for 'operator='
vector<bool, _Allocator>::operator=(vector&& __v)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/vector:2210:13: note: previous declaration is here
vector& operator=(vector&& __v)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/vector:2856:27: error: conflicting types for '__move_assign'
vector<bool, _Allocator>::__move_assign(vector& __c, true_type)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/vector:2418:10: note: previous declaration is here
void __move_assign(vector& __c, true_type)
^
In file included from /usr/local/google/home/jlebar/code/llvm/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp:14:
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/queue:711:44: error: conflicting types for 'swap'
priority_queue<_Tp, _Container, _Compare>::swap(priority_queue& __q)
^
/usr/local/google/home/jlebar/llvm/llvm/projects/libcxx/include/queue:514:10: note: previous declaration is here
void swap(priority_queue& __q)
^
17 errors generated.
--
Compilation failed unexpectedly!
https://reviews.llvm.org/D25403
More information about the cfe-commits
mailing list