From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 132693857404; Wed, 18 May 2022 09:25:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 132693857404 From: "acoplan at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/105600] ICE with LTO when building Mumble from git on arm64 Date: Wed, 18 May 2022 09:25:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: acoplan at gcc dot gnu.org 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: attachments.created 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, 18 May 2022 09:25:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105600 --- Comment #4 from Alex Coplan --- Created attachment 52988 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52988&action=3Dedit reduced testcase I managed to reproduce the environment and reduce a testcase (see the attac= hed tarball): $ cat build.sh #!/bin/bash set -e CC=3Daarch64-linux-gnu-g++ $CC -fsanitize=3Dundefined -flto -O2 -std=3Dgnu++14 -o a.o -c a.cc $CC -fsanitize=3Dundefined -O2 -std=3Dgnu++14 -o b.o -c b.cc $CC b.o a.o $ ./build.sh a.cc: In instantiation of =E2=80=98nlohmann::basic_json< , , , , , , , , , >::reference nlohmann::basic_json< , , , , , , , , , >::operator[](T) [with T =3D const char*; ObjectType =3D std::map; =3D std::vector; =3D std::__cxx11::basic_string; =3D bool; =3D long int; =3D long un= signed int; =3D double; =3D std::allocator; JSONSerializer =3D nlohmann::adl_serializer; =3D std::vector; reference =3D nlohmann::basic_json<>]=E2=80=99: a.cc:87:65: required from here a.cc:83:3: warning: no return statement in function returning non-void [-Wreturn-type] 83 | } | ^ during IPA pass: icf lto1: internal compiler error: Segmentation fault 0xd4b25f crash_signal /home/alecop01/toolchain/src/gcc/gcc/toplev.cc:322 0x11508b9 varpool_node::get_constructor() /home/alecop01/toolchain/src/gcc/gcc/varpool.cc:300 0x1bd2db6 ipa_icf::sem_variable::equals(ipa_icf::sem_item*, hash_map, ipa_icf::sem_item*> >&) /home/alecop01/toolchain/src/gcc/gcc/ipa-icf.cc:1697 0x1bd3e78 ipa_icf::sem_item_optimizer::subdivide_classes_by_equality(bool) /home/alecop01/toolchain/src/gcc/gcc/ipa-icf.cc:2731 0x1bdbce0 ipa_icf::sem_item_optimizer::execute() /home/alecop01/toolchain/src/gcc/gcc/ipa-icf.cc:2464 0x1bde1f2 ipa_icf_driver /home/alecop01/toolchain/src/gcc/gcc/ipa-icf.cc:3600 0x1bde1f2 ipa_icf::pass_ipa_icf::execute(function*) /home/alecop01/toolchain/src/gcc/gcc/ipa-icf.cc:3647 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. lto-wrapper: fatal error: aarch64-linux-gnu-g++ returned 1 exit status compilation terminated. /home/alecop01/toolchain/build-aarch64-linux-gnu/install/bin/../lib/gcc/aar= ch64-linux-gnu/13.0.0/../../../../aarch64-linux-gnu/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status Confirmed on trunk.=