Nvcc 13.4 ADL regression

nvcc 13.4 fails to find a hidden friend through argument-dependent lookup when the call appears in a static_assert inside a function template. nvcc 13.3 and every earlier release tested, and g++ 12, all find it.

The effect is a hard compile error on code that is valid C++ and that older nvcc accepted. In the reduced case below, 13.4 reports an ambiguity between two bool overloads; removing both of those leaves 13.4 reporting identifier "all" is undefined, which shows the hidden friend is not in the candidate set at all rather than merely losing overload resolution.

Moving the same call out of the static_assert makes 13.4 compile it. That is the narrowest trigger we found.

Failing toolkit CUDA 13.4, cuda_13.4.r13.4/compiler.38657139_0
Last good toolkit CUDA 13.3, cuda_13.3.r13.3/compiler.38244171_0 (V13.3.73)
Target architecture sm_90; also reproduced at sm_121
Host compiler g++ (Debian 12.2.0-14+deb12u1) 12.2.0
OS Debian 12 (bookworm), 12.15
CPU architecture aarch64 (also reproduced on x86_64)
Install method NVIDIA apt repository, Index of /compute/cuda/repos/debian12/sbsa
Language standard -std=c++17 (also fails at -std=c++20)

Reproducer: adl.cu

#include <cuda_runtime.h>

namespace Arith {
template <typename T, int D> struct vect {
  T elts[D];
  // hidden friends: findable only by argument-dependent lookup
  friend constexpr __host__ __device__ auto operator==(const vect &x, T a) {
    vect<bool, D> r{};
    for (int i = 0; i < D; ++i)
      r.elts[i] = x.elts[i] == a;
    return r;
  }
  friend constexpr __host__ __device__ auto all(const vect &x) {
    bool r = true;
    for (int i = 0; i < D; ++i)
      r = r && bool(x.elts[i]);
    return r;
  }
};
// a namespace-scope overload taking bool, alongside the hidden friend
constexpr __host__ __device__ bool all(bool x) { return x; }
} // namespace Arith

namespace CarpetX {
using namespace Arith;
template <int NI, int NJ, int NK> void apply_on_face() {
  constexpr Arith::vect<int, 3> inormal{NI, NJ, NK};
  static_assert(!all(inormal == 0));   // <-- fails on 13.4 only
}
void go() { apply_on_face<0, -1, -1>(); }
} // namespace CarpetX

Compile command

nvcc -x cu -std=c++17 -arch=sm_90 -c adl.cu -o adl.o

I have also tried compiling with nvc++ and I get the same error.