<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57172>57172</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Coroutines] Incorrect behavior if symmetric transferred coroutine throws exceptions
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            coroutines
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ChuanqiXu9
      </td>
    </tr>
</table>

<pre>
    The symmetric transfer would enforce the resuming call to be an musttail call. However, it is problematic if there is an exception throw from the resuming call. In this case, we can't catch the exception in the parent function's `unhandled_exception()`. Also the parent coroutine couldn't be marked as done, which violates the spec too.

This is showed in: https://godbolt.org/z/KWc1Kcbdz 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxlUk2P2yAQ_TX4gmo5OMbxwYc0q1Wrva7U3ioMk5gWQ8pA0t1f38HRNtWuhA3M53tvmIJ5GZ9n4PiyLJCi1TxF5fEIkV9DdoaDP4aogScKioB5sf7EtXKOp8An4MrzJWNKyrrVXPMv4QoXiEwcuE3cIj_HMDlYVKLq9lgqRSh2SoU_Gs7JBk_WGK78GMPysVXNv5YAStEKoRS-Ah09E32iPel5zbkXs341nFUEn_gxe13MFI6cySb7WXnjwPz4l8HEjomBfDXfOwz_Z-sQQ07WU8ciyK0pEV9U_AWGK-Qm-Buo2RKSiw1OJcC1Bp6BFA2hZs0Da_a3_3NhQgtnUsoQWNbu-ZzSGenAxCOtUzBTcKkO8US3V_qevunNk57MK69g3EjZyLbbDbIyY2uGdlBVssnByLrPhzfAyLoHUo4IRNAF86wIXCwz-DjuSEjuVNdp4F1RrHJ04zuMNs15qnVY6OLc5W37RPP-SQ3pahEzwRCPXb_pRTWPrR4GKY1utJRT37eq3TU9dKqTOzMMu6ZyagKHhQYTQt-ZCEFkKjuKRohmt5FNv912XS1lJ4ZpUoMEo449sG1DD826ugAp6lVxXDFN-YTkdBYT3p0K0Z48rLKV-iqnOcTxMGflf9vveahWBuMK_y8ePxNp">