On Thu, Oct 08, 2026 at 05:56:58PM +0200, Tomasz Kaminski wrote:
> These error are produced from value initialization of aggregate member in
> ctor initializer:
>     constexpr
>       __formatter_ptr() noexcept
>       : _M_spec()
>       {}
> 
> So these are bugs, there is no reads or lvalue-to-rvalue conversions.

Reduced:
struct A { int a; int b = ' '; };
struct B { constexpr B () noexcept : c () {} A c; };
constexpr B a;
This is similar to the problematic constexpr-dtor17.C testcase I've talked
about.

This is when trying to constant evaluate an INIT_EXPR
((struct B *) this)->c = <<< Unknown tree: aggr_init_expr
  4
  __ct_comp 
  D.2728
  (struct A *) <<< Unknown tree: void_cst >>> >>>;
where the INIT_EXPR in constexpr-dtor17.C was
<retval> = TARGET_EXPR <D.2743, <<< Unknown tree: aggr_init_expr
  4
  __ct_comp 
  D.2743
  (struct basic_string *) <<< Unknown tree: void_cst >>> >>>>;

So, are the special cases I need to ignore for this diagnostics
copying from (originally) AGGR_INIT_EXPR or that wrapped in
a TARGET_EXPR, or something similar?

        Jakub

Reply via email to