)]}'
{
  "commit": "f67c851f03cf14c82a43045ea567ab5fb06377ac",
  "tree": "d533305c2f574f3ca5e3cee4ce0670ed800ce6bc",
  "parents": [
    "823d5948aa2d8937befcb35f7b1bb9e33346efd9"
  ],
  "author": {
    "name": "Iain Sandoe",
    "email": "iain@sandoe.co.uk",
    "time": "Wed Jul 23 16:22:32 2025 +0100"
  },
  "committer": {
    "name": "Iain Sandoe",
    "email": "iain@sandoe.co.uk",
    "time": "Tue Jul 29 16:10:43 2025 +0100"
  },
  "message": "c++, coroutines: Handle allocation fail returns [PR121219].\n\nThe current implementation was returning the result of the g_r_o_o_a_f\ncall independently of the return expressions for \u0027normal\u0027 cases.\n\nThis prevents the NVRO that we need to guarantee copy elision for the\nramp return values - when these are initialised from a temporary of the\nsame type.\n\nThe solution here reorders the code so that the regular return expression\nappears before the allocation-failed case.  Ensure that the g_r_o and\nassociated code appears in a distinct scope.  These steps are to meet the\nconstaints of NRV.\n\n\tPR c++/121219\n\ngcc/cp/ChangeLog:\n\n\t* coroutines.cc\n\t(cp_coroutine_transform::build_ramp_function): Reorder the return\n\texpressions for the \u0027normal\u0027 and \u0027allocation failed\u0027 cases so that\n\tNRV constraints are met.\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/coroutines/torture/pr121219.C: New test.\n\nSigned-off-by: Iain Sandoe \u003ciain@sandoe.co.uk\u003e\n(cherry picked from commit a2775feb7c7de9f21f79052e2b6a752a3eb08f07)\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "306424c22b021e0fd0b187e41424c87e7fd1f309",
      "old_mode": 33188,
      "old_path": "gcc/cp/coroutines.cc",
      "new_id": "3fe22ac98024caaf85f65322d6cd09825e7c86ee",
      "new_mode": 33188,
      "new_path": "gcc/cp/coroutines.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d1e7cb1e02251873848dd9475ee65695d8bb5f65",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/g++.dg/coroutines/torture/pr121219.C"
    }
  ]
}
