From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C1473858D37; Tue, 20 Sep 2022 08:00:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C1473858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663660810; bh=2kZuWtAB7LZK1e2WhBHe4H77mrQI0CJHJpUloyQ6cxQ=; h=From:To:Subject:Date:From; b=LFZggw/n+NAxILhkOv6B4QsJsIdTyAsTgJXxt/cfWQmhfYbGtwGPM7OMwtnOzYWmr nD+0Lk581QEx34evazyzi4T9+2KQeiyi2ftxWJBPDGJmqtdFUT0abnrHC1weOpsGth AsTqX8Hv8HeV/1OQzQhdElcm0SIMadp1+WynMHik= From: "woohp135 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106973] New: coroutine generator and setjmp Date: Tue, 20 Sep 2022 08:00:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: woohp135 at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D106973 Bug ID: 106973 Summary: coroutine generator and setjmp Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: woohp135 at gmail dot com Target Milestone: --- #include "generator.hpp" #include using namespace std; cppcoro::generator foo() { jmp_buf env; setjmp(env); co_yield 1; } int main() { return 0; } The generator.hpp file is from https://github.com/lewissbaker/cppcoro/blob/master/include/cppcoro/generato= r.hpp I'm getting this error: > g++ -std=3Dc++2a -Wall -Wextra -freport-bug foo.cpp during GIMPLE pass: coro-early-expand-ifns foo.cpp: In function =E2=80=98void foo(foo()::_Z3foov.Frame*)=E2=80=99: foo.cpp:6:25: internal compiler error: Segmentation fault 6 | cppcoro::generator foo() | ^~~ 0x19eab38 internal_error(char const*, ...) ???:0 I believe it is the setjmp that is causing the issue. This code compiles fi= ne on clang.=