#2818: failing tests with gcc-14
Reporter: Roland Haas Status: new Milestone: Version: Type: bug Priority: major Component: EinsteinToolkit thorn
Comment (by Erik Schnetter):
`vect` objects are created via this mechanism (see `vect.hxx1):
```c++ template <typename T, std::size_t N, typename F> constexpr ARITH_INLINE ARITH_DEVICE ARITH_HOST std::array<T, N> construct_array(const F &f) { if constexpr (N == 0) return std::array<T, N>(); if constexpr (N > 0) return array_push<T>(construct_array<T, N - 1>(f), f(N - 1)); } ```
Maybe the compiler is getting confused by the `constexpr` expressions and accidentally evaluates the second `if` statement? That’s the only `- 1` that I see.
If so, you could try splitting the function into two, with an `enable_if` condition checking `N==0` and `N>0`, and removing the `if constexpr` statements from the bodies.
-- Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2818/failing-tests-with...
trac@lists.einsteintoolkit.org