From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 14B843858016; Wed, 4 May 2022 07:15:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14B843858016 From: "remi.coulom at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/105469] "execution reached an unreachable program point" with -flto Date: Wed, 04 May 2022 07:15:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: remi.coulom 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: 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 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: Wed, 04 May 2022 07:15:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105469 --- Comment #2 from R=C3=A9mi Coulom --- (In reply to Richard Biener from comment #1) > I can reproduce what you observe with -O3 -fwhole-program > -fsanitize=3Dunreachable > (without the sanitize it gets into an infinite loop). -fno-ipa-cp-clone > avoids > the issue (whatever it is exactly). >=20 > Can you attach un-preprocessed source as well? You seem to be not using = any > non-standard header files. Thanks for checking my code. The code is available on github: https://github.com/Remi-Coulom/joedb Necessary files to replicate the bug can be found there: https://github.com/Remi-Coulom/joedb/tree/master/doc/source/tutorial/gcc_bug repro.cpp and all_includes.h should be enough. I produced repro.cpp by preprocessing bug.cpp and pruning a lot of code. I suppose repro.cpp should be enough for your purpose. If you ever wish to compile bug.cpp you'll have to compile joedb first by running "./generate.s= h" in doc/source/tutorial.=