See <https://wg21.link/P2747R2>.
Created attachment 58563 [details] gcc15-pr115744-wip.patch Untested WIP patch.
(In reply to Jakub Jelinek from comment #1) > Untested WIP patch. In the conversion lval change, I'd think we want vc_discard for conversion to void, and to pass through whatever lval for VIEW_CONVERT_EXPR.
Created attachment 58580 [details] gcc15-pr115744.patch With the PR115754 change in, this seems mostly about the FTMs and making placement new constexpr. The only thing that doesn't work is the new (p + 1) int[]{2, 3}; // error (in this paper) case from the paper xfailed in the last testcase, the IL has there <<< Unknown tree: expr_stmt (void) (TARGET_EXPR <D.2640, (void *) TARGET_EXPR <D.2641, VIEW_CONVERT_EXPR<int *>(b) + 4>>, TARGET_EXPR <D.2642, operator new [] (8, NON_LVALUE_EXPR <D.2640>)>, int * D.2643; <<< Unknown tree: expr_stmt (void) (D.2643 = (int *) D.2642) >>>; and so there is nothing that would trigger some error during constexpr evaluation. Shouldn't build_new_1 for maybe_constexpr_fn (current_function_decl) in the array_p case add some extra cast to the array type it is looking for rather than just the ultimate element type?