Is this a duplicate?
Type of Bug
Compile-time Error
Describe the bug
With the new compiler version the test fails with 2 errors
- error: call to deleted function 'make_unique_for_overwrite'
- error: static assertion failed due to requirement '!HasMakeUniqueForOverwrite<int[2]>'
It seems that the error is not caught correctly anymore in the static assertion which should exactly test for this case. In previous compiler version this test succeeded. Further investigation is needed to check if this a compiler bug or if we need to change the semantics of the test.
How to Reproduce
Compile command:
/__w/TheRock/TheRock/build/lib/llvm/bin/clang++ --offload-arch=gfx942 -O3 -o "/__w/TheRock/TheRock/build/libhipcxx/build/libcudacxx-cpp17/test/test/std/utilities/memory/smartptr/unique.ptr/unique.ptr.create/Output/make_unique_for_overwrite.pass.cpp.o" -x hip /__w/TheRock/TheRock/build/libhipcxx/.upstream-tests/test/std/utilities/memory/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp -Wno-unused-command-line-argument -c -std=c++17 -v -ftemplate-depth=270 -Werror=thread-safety -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-rtti -D_LIBCUDACXX_NO_RTTI -I/__w/TheRock/TheRock/build/libhipcxx/test/support -D_CCCL_NO_SYSTEM_HEADER -DLIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE -include /__w/TheRock/TheRock/build/libhipcxx/test/force_include_hip.h -I/__w/TheRock/TheRock/build/libhipcxx/include -I/__w/TheRock/TheRock/build/libhipcxx/include -c -Wno-unused-command-line-argument
Compile the test to produce the following error log (https://github.com/ROCm/TheRock/actions/runs/20857765231/job/59940824852?pr=2018#step:10:1733):
5: /__w/TheRock/TheRock/build/libhipcxx/.upstream-tests/test/std/utilities/memory/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp:32:29: error: call to deleted function 'make_unique_for_overwrite'
5: 32 | requires(Args&&... args)((cuda::std::make_unique_for_overwrite(cuda::std::forward(args)...))));
5: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:267:47: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT'
5: 267 | LIBCUDACXX_CONCEPT_FRAGMENT_REQS##VA_ARGS
5: | ^~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:283:89: note: expanded from macro 'LIBCUDACXX_CONCEPT_FRAGMENT_REQS_2'
5: 283 | # define LIBCUDACXX_CONCEPT_FRAGMENT_REQS_2(...) _LIBCUDACXX_CONCEPT_FRAGMENT_TRUE(VA_ARGS)
5: | ^~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:279:81: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT_TRUE'
5: 279 | !(decltype(_LIBCUDACXX_PP_FOR_EACH(_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M, VA_ARGS) void(), false){})
5: | ^~~~~~~~~~~
5: note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:286:8: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M'
5: 286 | (_REQ),
5: | ^~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:211:76: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M1'
5: 211 | # define _LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M1(_REQ) _LIBCUDACXX_PP_EXPAND _REQ
5: | ^~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:47:38: note: expanded from macro '_LIBCUDACXX_PP_EXPAND'
5: 47 | # define _LIBCUDACXX_PP_EXPAND(...) VA_ARGS
5: | ^~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/.upstream-tests/test/std/utilities/memory/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp:59:15: error: static assertion failed due to requirement '!HasMakeUniqueForOverwrite<int[2]>':
5: 59 | static_assert(!HasMakeUniqueForOverwrite<int[2]>, "");
5: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/.upstream-tests/test/std/utilities/memory/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp:32:29: error: call to deleted function 'make_unique_for_overwrite'
5: 32 | requires(Args&&... args)((cuda::std::make_unique_for_overwrite(cuda::std::forward(args)...))));
5: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:267:47: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT'
5: 267 | LIBCUDACXX_CONCEPT_FRAGMENT_REQS##VA_ARGS
5: | ^~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:283:89: note: expanded from macro 'LIBCUDACXX_CONCEPT_FRAGMENT_REQS_2'
5: 283 | # define LIBCUDACXX_CONCEPT_FRAGMENT_REQS_2(...) _LIBCUDACXX_CONCEPT_FRAGMENT_TRUE(VA_ARGS)
5: | ^~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:279:81: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT_TRUE'
5: 279 | !(decltype(_LIBCUDACXX_PP_FOR_EACH(_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M, VA_ARGS) void(), false){})
5: | ^~~~~~~~~~~
5: note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:286:8: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M'
5: 286 | (_REQ),
5: | ^~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:211:76: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M1'
5: 211 | # define _LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M1(_REQ) _LIBCUDACXX_PP_EXPAND _REQ
5: | ^~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:47:38: note: expanded from macro '_LIBCUDACXX_PP_EXPAND'
5: 47 | # define _LIBCUDACXX_PP_EXPAND(...) VA_ARGS
5: | ^~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/.upstream-tests/test/std/utilities/memory/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp:60:15: error: static assertion failed due to requirement '!HasMakeUniqueForOverwrite<int[2], unsigned long>':
5: 60 | static_assert(!HasMakeUniqueForOverwrite<int[2], cuda::std::size_t>, "");
5: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expected behavior
Passing test.
Operating System
No response
rocm-smi output
No response
hipcc version
No response
Is this a duplicate?
Type of Bug
Compile-time Error
Describe the bug
With the new compiler version the test fails with 2 errors
It seems that the error is not caught correctly anymore in the static assertion which should exactly test for this case. In previous compiler version this test succeeded. Further investigation is needed to check if this a compiler bug or if we need to change the semantics of the test.
How to Reproduce
Compile command:
/__w/TheRock/TheRock/build/lib/llvm/bin/clang++ --offload-arch=gfx942 -O3 -o "/__w/TheRock/TheRock/build/libhipcxx/build/libcudacxx-cpp17/test/test/std/utilities/memory/smartptr/unique.ptr/unique.ptr.create/Output/make_unique_for_overwrite.pass.cpp.o" -x hip /__w/TheRock/TheRock/build/libhipcxx/.upstream-tests/test/std/utilities/memory/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp -Wno-unused-command-line-argument -c -std=c++17 -v -ftemplate-depth=270 -Werror=thread-safety -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-rtti -D_LIBCUDACXX_NO_RTTI -I/__w/TheRock/TheRock/build/libhipcxx/test/support -D_CCCL_NO_SYSTEM_HEADER -DLIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE -include /__w/TheRock/TheRock/build/libhipcxx/test/force_include_hip.h -I/__w/TheRock/TheRock/build/libhipcxx/include -I/__w/TheRock/TheRock/build/libhipcxx/include -c -Wno-unused-command-line-argument
Compile the test to produce the following error log (https://github.com/ROCm/TheRock/actions/runs/20857765231/job/59940824852?pr=2018#step:10:1733):
5: /__w/TheRock/TheRock/build/libhipcxx/.upstream-tests/test/std/utilities/memory/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp:32:29: error: call to deleted function 'make_unique_for_overwrite'
5: 32 | requires(Args&&... args)((cuda::std::make_unique_for_overwrite(cuda::std::forward(args)...))));
5: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:267:47: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT'
5: 267 | LIBCUDACXX_CONCEPT_FRAGMENT_REQS##VA_ARGS
5: | ^~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:283:89: note: expanded from macro 'LIBCUDACXX_CONCEPT_FRAGMENT_REQS_2'
5: 283 | # define LIBCUDACXX_CONCEPT_FRAGMENT_REQS_2(...) _LIBCUDACXX_CONCEPT_FRAGMENT_TRUE(VA_ARGS)
5: | ^~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:279:81: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT_TRUE'
5: 279 | !(decltype(_LIBCUDACXX_PP_FOR_EACH(_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M, VA_ARGS) void(), false){})
5: | ^~~~~~~~~~~
5: note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:286:8: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M'
5: 286 | (_REQ),
5: | ^~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:211:76: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M1'
5: 211 | # define _LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M1(_REQ) _LIBCUDACXX_PP_EXPAND _REQ
5: | ^~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:47:38: note: expanded from macro '_LIBCUDACXX_PP_EXPAND'
5: 47 | # define _LIBCUDACXX_PP_EXPAND(...) VA_ARGS
5: | ^~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/.upstream-tests/test/std/utilities/memory/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp:59:15: error: static assertion failed due to requirement '!HasMakeUniqueForOverwrite<int[2]>':
5: 59 | static_assert(!HasMakeUniqueForOverwrite<int[2]>, "");
5: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/.upstream-tests/test/std/utilities/memory/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp:32:29: error: call to deleted function 'make_unique_for_overwrite'
5: 32 | requires(Args&&... args)((cuda::std::make_unique_for_overwrite(cuda::std::forward(args)...))));
5: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:267:47: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT'
5: 267 | LIBCUDACXX_CONCEPT_FRAGMENT_REQS##VA_ARGS
5: | ^~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:283:89: note: expanded from macro 'LIBCUDACXX_CONCEPT_FRAGMENT_REQS_2'
5: 283 | # define LIBCUDACXX_CONCEPT_FRAGMENT_REQS_2(...) _LIBCUDACXX_CONCEPT_FRAGMENT_TRUE(VA_ARGS)
5: | ^~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:279:81: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT_TRUE'
5: 279 | !(decltype(_LIBCUDACXX_PP_FOR_EACH(_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M, VA_ARGS) void(), false){})
5: | ^~~~~~~~~~~
5: note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:286:8: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M'
5: 286 | (_REQ),
5: | ^~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:211:76: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M1'
5: 211 | # define _LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M1(_REQ) _LIBCUDACXX_PP_EXPAND _REQ
5: | ^~~~
5: /__w/TheRock/TheRock/build/libhipcxx/include/cuda/std/__concepts/__concept_macros.h:47:38: note: expanded from macro '_LIBCUDACXX_PP_EXPAND'
5: 47 | # define _LIBCUDACXX_PP_EXPAND(...) VA_ARGS
5: | ^~~~~~~~~~~
5: /__w/TheRock/TheRock/build/libhipcxx/.upstream-tests/test/std/utilities/memory/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp:60:15: error: static assertion failed due to requirement '!HasMakeUniqueForOverwrite<int[2], unsigned long>':
5: 60 | static_assert(!HasMakeUniqueForOverwrite<int[2], cuda::std::size_t>, "");
5: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expected behavior
Passing test.
Operating System
No response
rocm-smi output
No response
hipcc version
No response