https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99859

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The argument is a pointer.
Now, I bet a pointer to an automatic variable will be seen as non-constant and
so in that case we might be ok.
If the argument is a pointer to some global constexpr variable, dunno.
And, on this testcase the argument is a heap pointer which during constexpr
evaluation we pretend it is constant.
So maybe cxx_bind_parameters_in_call should set *non_constant_args also when
arg is ADDR_EXPR of something with heap_*identifier* VAR_DECL as base?

Reply via email to