public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "acoplan at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-105600-4-CZAuNCc5AU@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105600-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105600

--- Comment #4 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Created attachment 52988
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52988&action=edit
reduced testcase

I managed to reproduce the environment and reduce a testcase (see the attached
tarball):

$ cat build.sh
#!/bin/bash
set -e
CC=aarch64-linux-gnu-g++
$CC -fsanitize=undefined -flto -O2 -std=gnu++14 -o a.o -c a.cc
$CC -fsanitize=undefined -O2 -std=gnu++14 -o b.o -c b.cc
$CC b.o a.o
$ ./build.sh
a.cc: In instantiation of ‘nlohmann::basic_json< <template-parameter-1-1>,
<template-parameter-1-2>, <template-parameter-1-3>, <template-parameter-1-4>,
<template-parameter-1-5>, <template-parameter-1-6>, <template-parameter-1-7>,
<template-parameter-1-8>, <template-parameter-1-9>, <template-parameter-1-10>
>::reference nlohmann::basic_json< <template-parameter-1-1>,
<template-parameter-1-2>, <template-parameter-1-3>, <template-parameter-1-4>,
<template-parameter-1-5>, <template-parameter-1-6>, <template-parameter-1-7>,
<template-parameter-1-8>, <template-parameter-1-9>, <template-parameter-1-10>
>::operator[](T) [with T = const char*; ObjectType = std::map;
<template-parameter-1-2> = std::vector; <template-parameter-1-3> =
std::__cxx11::basic_string<char>; <template-parameter-1-4> = bool;
<template-parameter-1-5> = long int; <template-parameter-1-6> = long unsigned
int; <template-parameter-1-7> = double; <template-parameter-1-8> =
std::allocator; JSONSerializer = nlohmann::adl_serializer;
<template-parameter-1-10> = std::vector<unsigned char>; reference =
nlohmann::basic_json<>]’:
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<symtab_node*, ipa_icf::sem_item*,
simple_hashmap_traits<default_hash_traits<symtab_node*>, 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 <https://gcc.gnu.org/bugs/> 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/aarch64-linux-gnu/13.0.0/../../../../aarch64-linux-gnu/bin/ld:
error: lto-wrapper failed
collect2: error: ld returned 1 exit status

Confirmed on trunk.

  parent reply	other threads:[~2022-05-18  9:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 21:13 [Bug lto/105600] New: " sam at gentoo dot org
2022-05-13 21:55 ` [Bug lto/105600] " pinskia at gcc dot gnu.org
2022-05-17 10:18 ` [Bug ipa/105600] " acoplan at gcc dot gnu.org
2022-05-17 10:29 ` acoplan at gcc dot gnu.org
2022-05-18  9:25 ` acoplan at gcc dot gnu.org [this message]
2022-05-18  9:26 ` acoplan at gcc dot gnu.org
2022-05-18  9:50 ` acoplan at gcc dot gnu.org
2022-05-18 11:04 ` marxin at gcc dot gnu.org
2022-05-18 11:40 ` [Bug ipa/105600] [12/13 Regression] ICE with LTO when building Mumble since r12-5696-g53caa4723d8de73f marxin at gcc dot gnu.org
2022-05-18 12:09 ` marxin at gcc dot gnu.org
2022-05-18 22:15 ` sam at gentoo dot org
2022-05-19  7:11 ` marxin at gcc dot gnu.org
2022-05-19  7:44 ` acoplan at gcc dot gnu.org
2022-05-20  7:02 ` [Bug ipa/105600] [9/10/11/12/13 " rguenth at gcc dot gnu.org
2022-05-20  9:22 ` [Bug ipa/105600] [9/10/11/12/13 Regression] ICE with LTO when building Mumble acoplan at gcc dot gnu.org
2022-05-20 11:44 ` marxin at gcc dot gnu.org
2022-05-27  9:48 ` [Bug ipa/105600] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-23  4:08 ` cvs-commit at gcc dot gnu.org
2022-06-23  4:08 ` [Bug ipa/105600] [10/11/12 " marxin at gcc dot gnu.org
2022-06-23 10:10 ` cvs-commit at gcc dot gnu.org
2022-06-23 10:12 ` cvs-commit at gcc dot gnu.org
2022-06-23 10:12 ` marxin at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-105600-4-CZAuNCc5AU@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).