From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 544C83858C20; Fri, 4 Mar 2022 07:45:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 544C83858C20 From: "janezz55 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/104777] New: gcc crashes while compiling a custom coroutine library sample Date: Fri, 04 Mar 2022 07:45:14 +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: 11.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: janezz55 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2022 07:45:14 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104777 Bug ID: 104777 Summary: gcc crashes while compiling a custom coroutine library sample Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: janezz55 at gmail dot com Target Milestone: --- The code sample is here https://github.com/user1095108/cr. gcc crashes only= if the optimization level is higher than 2. g++ -I.. -Ofast -no-pie -std=3Dc++20 loop.cpp -o l clang compiles everything without issue. ./lduring RTL pass: sched2 In file included from /usr/include/c++/11.2.0/functional:59, from /usr/include/c++/11.2.0/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11.2.0/algorithm:74, from loop.hpp:5, from loop.cpp:3: /usr/include/c++/11.2.0/bits/std_function.h: In static member function 'sta= tic _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res =3D void; _Functor =3D main()::; _ArgTypes =3D {}]': /usr/include/c++/11.2.0/bits/std_function.h:293:7: internal compiler error:= in move_insn, at haifa-sched.c:5471 293 | } | ^ 0xe4c988 internal_error(char const*, ...) ???:0 0xe42d02 fancy_abort(char const*, int, char const*) ???:0 0x13ee792 schedule_block(basic_block_def**, void*) ???:0 0x13da4f2 schedule_insns() ???:0 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=