This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING PATCH coroutines] Handle component_ref in captures_temporary


在 2020/2/12 下午3:23, JunMa 写道:
Kindly ping

Regards
JunMa
Hi
In captures_temporary, the current implementation fails to handle
component_ref. This causes ice with case co_await A while
operator co_await is defined in base class of A. Also it is necessary
to capture the object of base class as if it is temporary object.

This patch strips component_ref to its base object and check it as usual.

Bootstrap and test on X86_64, is it OK?

Regards
JunMa

gcc/cp
2020-02-12  Jun Ma <JunMa@linux.alibaba.com>

        * coroutines.cc (captures_temporary): Strip component_ref
        to its base object.

gcc/testsuite
2020-02-12  Jun Ma <JunMa@linux.alibaba.com>

        * g++.dg/coroutines/torture/co-await-15-capture-comp-ref.C: New test.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]