Code gets compiler with C++17, but C++20 leads to
Internal error: assertion failed at: "il.cpp", line 10269 in trans_unit_for_source_corresp
Code:
#include <numeric>
#include <vector>
#include <execution>
auto main() -> int
{
std::vector const a = {1., 2.};
std::vector const b = {5., 7.};
auto const expected = 19.;
auto const ab = std::transform_reduce(
std::execution::par_unseq,
std::cbegin(a), std::cend(a),
std::cbegin(b),
0.0
);
return (expected == ab) ? EXIT_SUCCESS : EXIT_FAILURE;
}
Command options:
nvc++ -stdpar=gpu -gpu=cc70 -std=c++20
Configuration: gcc 12.1.1, nvc++ 22.5-0, CUDA 11.7.