public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/105600] [12/13 Regression] ICE with LTO when building Mumble since r12-5696-g53caa4723d8de73f
Date: Wed, 18 May 2022 12:09:09 +0000	[thread overview]
Message-ID: <bug-105600-4-YEpso2jyv4@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 #9 from Martin Liška <marxin at gcc dot gnu.org> ---
So what happens in WPA:

1) we read IPA ICF summary and the variable has definition:

(gdb) p vnode->debug()
_ZN8nlohmann6detail12static_constINS0_10to_json_fnEE5valueE/10 (value)
@0x7ffff7fb3200
  Type: variable definition analyzed
  Visibility: externally_visible semantic_interposition preempted_reg public
weak comdat
comdat_group:_ZN8nlohmann6detail12static_constINS0_10to_json_fnEE5valueE
one_only
  References: 
  Referring:
_Z7to_jsonRN8nlohmann10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmiSaNS_14adl_serializerES2_IhSaIhEEEERK8Settings/1
(addr)
_Z7to_jsonRN8nlohmann10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmiSaNS_14adl_serializerES2_IhSaIhEEEERK8Settings/1
(addr) 
  Read from file: a.o
  Availability: not-ready
  Varpool flags: initialized read-only const-value-known
$1 = void

2) the symbols is removed in unreachable nodes:
#0  symbol_table::remove_unreachable_nodes (this=<optimized out>,
file=<optimized out>) at /home/marxin/Programming/gcc/gcc/ipa.cc:639
#1  0x00000000008e1277 in read_cgraph_and_symbols (nfiles=<optimized out>,
fnames=<optimized out>) at
/home/marxin/Programming/gcc/gcc/lto/lto-common.cc:2959
#2  0x00000000008c7540 in lto_main () at
/home/marxin/Programming/gcc/gcc/lto/lto.cc:626
#3  0x0000000000e229d4 in compile_file () at
/home/marxin/Programming/gcc/gcc/toplev.cc:452
#4  0x00000000008a0822 in do_compile (no_backend=false) at
/home/marxin/Programming/gcc/gcc/toplev.cc:2144
#5  toplev::main (this=this@entry=0x7fffffffd93e, argc=<optimized out>,
argc@entry=17, argv=<optimized out>, argv@entry=0x7fffffffda68) at
/home/marxin/Programming/gcc/gcc/toplev.cc:2296
#6  0x00000000008a1f32 in main (argc=17, argv=0x7fffffffda68) at
/home/marxin/Programming/gcc/gcc/main.cc:39

3) IPA ICF loads the body:
(gdb) p item->node->debug()
_ZN8nlohmann6detail12static_constINS0_10to_json_fnEE5valueE/10 (value)
@0x7ffff7fb3200
  Type: variable
  Body removed by symtab_remove_unreachable_nodes
  Visibility: externally_visible semantic_interposition preempted_reg external
public weak comdat
comdat_group:_ZN8nlohmann6detail12static_constINS0_10to_json_fnEE5valueE
one_only
  References: 
  Referring:
_Z7to_jsonRN8nlohmann10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmiSaNS_14adl_serializerES2_IhSaIhEEEERK8Settings/1
(addr)
_Z7to_jsonRN8nlohmann10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmiSaNS_14adl_serializerES2_IhSaIhEEEERK8Settings/1
(addr) 
  Read from file: a.o
  Availability: not_available
  Varpool flags: initialized read-only
$8 = void

So we need to filter our such symbols.

  parent reply	other threads:[~2022-05-18 12:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 21:13 [Bug lto/105600] New: ICE with LTO when building Mumble from git on arm64 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
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 [this message]
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-YEpso2jyv4@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).