From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E9E4B385B18B; Sun, 27 Nov 2022 15:42:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9E4B385B18B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669563771; bh=+s1kPdgpCvkxRPkl8kl3xGSoiA+3z47FuRN/lJvw4uo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=b5FLmwrxMEHfiLi8MZcvQwb+V3jioj7ki7cWLEj2iY2GFBY8+o+A32vmsK/PSHt01 frsgr8vnEdknLTSlsbn2NI2xfatcjZBa+tkJSTl8LQekaQFoUXP4cCW/s9xTaiFKMY tH9YD9BBlZqsJy994YM1OcAquBqY2d7GZlv/teb0= From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99576] [coroutines] destructor of a temporary called too early within co_await expression Date: Sun, 27 Nov 2022 15:42:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.2.1 X-Bugzilla-Keywords: C++-coroutines, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99576 --- Comment #10 from Iain Sandoe --- (In reply to Adrian Perl from comment #9) > Thanks for the advice. >=20 > I hope you meant __builtin_trap() as I can't find a __builtin_abort() > function. hmm .. I meant __builtin_abort () ... it is widely used in the testsuite for the reasons mentioned (try grepping for it in gcc/testsuite/gcc.dg to see s= ome examples). > I have now written test applications for all relevant bug reports (99576, > 100611, 101976, 101367).=20 great! > I also verified that it fixes 107288, but did not add a test as it requir= es boost asio. The way to deal with cases like that is to take the .ii file (so that the dependencies on external headers are removed) and then reduce it to somethi= ng usable as a test. Such reductions vary in difficulty (using tools like c-v= ise or creduce can help, sometimes it's possible to do it manually too). [I'm = not asking you to do this right now, but mentioning that this is the approach u= sed in such cases]. > Unfortunately I was wrong that the patch will fix 102217 and 101244. They > use similar examples but also the ternary operator, which still leads to = an > invalid statement error when used in co_awaits. Yes, this is a different problem for which I have some work in progress, but not ready for publication just yet. > I will send the patch together with the testfiles as soon as the testsuite > has finished. Is it normal that it takes more than 6 hours to complete? depends on your hardware .. my fastest box takes about 2 hours, my slowest nearly a week :) .. so long as you are using "-jN" on the make line where N= =E2=89=88 the number of threads your hardware will accommodate, that's about the best= you can do. If you plan on working more with GCC there is also the option to get an acc= ount on the "compile farm" which gives you access to more platform versions and = some quite powerful hardware.=