Repository navigation
EDG front end error on re-entrant evaluation of a consteval function used as constraint. #299
zaides-blackduck
started this conversation in
Issue Triage - Compilation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Issue Summary
The code below compiles with GCC but fails with Clang.
Re-entrant evaluation of a copy-constructor with consteval caused an error.
Reproducing Source Code
`#include
struct Action
{
Action() = default;
template
Action(F f);
};
template
struct Matcher
{
Matcher() = default;
Matcher(T value);
};
using Elem = const Action&;
using Tup = std::tuple;
using MTup = Matcher<const Tup&>;
int main()
{
MTup src{};
MTup dst = src;
}`
Command-line Options
--g++ --gnu_version 150100 --c++23
Type of Issue
[Front End] This code SHOULD compile with these options.
Additional Details
This issue is reproducible on [https://godbolt.org/]
Errors:"
"/cefs/38/383ad2f84cbd57a52fd68bbe_consolidated/compilers_c++_x86_gcc_16.1.0/include/c++/16.1.0/type_traits", line 1232: error: template constraint not satisfied
= __bool_constant<__is_constructible(_Tp, _Args...)>;
^
"/cefs/38/383ad2f84cbd57a52fd68bbe_consolidated/compilers_c++_x86_gcc_16.1.0/include/c++/16.1.0/tuple", line 981: note: substitution of arguments "<Matcher<const Tup &> &>" for requires-clause failed
&& (!__dangles<_UTypes...>())
^
"/cefs/38/383ad2f84cbd57a52fd68bbe_consolidated/compilers_c++_x86_gcc_16.1.0/include/c++/16.1.0/tuple", line 980: note: atomic constraint not constant
&& (__constructible<_UTypes...>())
^
"/cefs/38/383ad2f84cbd57a52fd68bbe_consolidated/compilers_c++_x86_gcc_16.1.0/include/c++/16.1.0/tuple", line 980: note: this call cannot be evaluated because the target function function "std::tuple<_Elements...>::__constructible<_UTypes...>() [with _Elements=, _UTypes=<Matcher<const Tup &> &>]" (declared at line 840 of "/cefs/38/383ad2f84cbd57a52fd68bbe_consolidated/compilers_c++_x86_gcc_16.1.0/include/c++/16.1.0/tuple") is not constexpr or not completely defined yet
&& (__constructible<_UTypes...>())
^
detected during:
instantiation of type "std::__is_constructible_impl<Elem, Matcher<const Tup &> &>" at line 1238
instantiation of class "std::is_constructible<_Tp, _Args...> [with _Tp=Elem, _Args=<Matcher<const Tup &> &>]" at line 207
instantiation of class "std::_and<_Bn...> [with _Bn=<std::is_constructible<Elem, Matcher<const Tup &> &>>]" at line 222
instantiation of "const bool std::__and_v [with _Bn=<std::is_constructible<Elem, Matcher<const Tup &> &>>]" at line 843 of "/cefs/38/383ad2f84cbd57a52fd68bbe_consolidated/compilers_c++_x86_gcc_16.1.0/include/c++/16.1.0/tuple"
instantiation of "bool std::tuple<_Elements...>::__constructible<_UTypes...>() [with _Elements=, _UTypes=<Matcher<const Tup &> &>]" at line 24 of "
"", line 24: warning: variable "dst" was set but never used
MTup dst = src;
^
1 error detected in the compilation of "".
Compiler returned: 2
Reproducing (Standard) Configuration(s)
linux-gcc-release
Reproducing (Non-standard) Configuration
No response
I acknowledge that:
LICENSE.txtfile in my.zipor.tar.gzupload. If I included aLICENSE.txtfile, any tests created using the reproducing source code will be governed by the terms of the license I provided instead.All reactions