On 4/29/20 6:50 AM, Iain Sandoe wrote:
Hi,

When we have completely missing key information (e.g. the
coroutine_traits) or a partially transformed function body, we
need to try and balance returning useful information about
failures with the possibility that some part of the diagnostics
machinery or following code will not be able to handle the
state.

The PRs (and revised testcase) point to cases where that processing
has failed.

This revises the process to avoid special handling for the
ramp, and falls back on the same code used for regular function
fails.

There are test-cases (in addition to the ones for the PRs) that now
cover all early exit points [where the transforms are considered
to have failed in a manner that does not allow compilation to
continue].

tested on x86_64-darwin
OK for master after testing on x86-64-linux?
thanks
Iain

gcc/cp/ChangeLog:

2020-04-29  Iain Sandoe  <i...@sandoe.co.uk>

        PR c++/94817
        PR c++/94829
        * coroutines.cc (morph_fn_to_coro): Set unformed outline
        functions to error_mark_node.  For early error returns suppress
        warnings about missing ramp return values.  Fix reinstatement
        of the function body on pre-existing initial error.
        * decl.c (finish_function): Use the normal error path for fails
        in the ramp function, do not try to compile the helpers if the
        transform fails.


ok


--
Nathan Sidwell

Reply via email to