https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30854
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:e6d21cbf5cf035b6fa9946a4321f87cbcfa9f275 commit r15-4752-ge6d21cbf5cf035b6fa9946a4321f87cbcfa9f275 Author: Jason Merrill <ja...@redhat.com> Date: Tue Oct 22 17:45:00 2024 -0400 c++: printing AGGR_INIT_EXPR args PR30854 was about wrongly dumping the dummy object argument to a constructor; r126582 in 4.3 fixed that by skipping the first argument. But not all functions called by AGGR_INIT_EXPR are constructors, as observed in PR116634; we shouldn't skip for non-member functions. And let's combine the printing code for CALL_EXPR and AGGR_INIT_EXPR. This doesn't make us accept the ill-formed 116634 testcase again with a pedwarn, just fixes the diagnostic issue. PR c++/30854 PR c++/116634 gcc/cp/ChangeLog: * error.cc (dump_aggr_init_expr_args): Remove. (dump_call_expr_args): Handle AGGR_INIT_EXPR. (dump_expr): Combine AGGR_INIT_EXPR and CALL_EXPR cases. gcc/testsuite/ChangeLog: * g++.dg/coroutines/coro-bad-alloc-02-no-op-new-nt.C: Adjust diagnostic. * g++.dg/diagnostic/aggr-init1.C: New test.