public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/105399] New: [12 Regression] -O2/-Ofast -flto ICEs as internal compiler error: verify_cgraph_node failed
@ 2022-04-26 22:27 slyfox at gcc dot gnu.org
  2022-04-27  6:10 ` [Bug lto/105399] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: slyfox at gcc dot gnu.org @ 2022-04-26 22:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105399
           Summary: [12 Regression] -O2/-Ofast -flto ICEs as internal
                    compiler error: verify_cgraph_node failed
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Found as an ICE on ncnn project. Minimized example:

    // cat bug.cpp.cpp
    struct S {
      S();
    };
    S::S() {}

$ g++ -fPIC -flto -Ofast         -o bug.o      -c bug.cpp.cpp
$ g++ -fPIC -flto -O2    -shared -o libncnn.so    bug.o

lto1: error: semantic interposition mismatch
_ZN1SC1Ev/2 (__ct_comp ) @0x7f8bd1e14110
  Type: function definition analyzed alias
  Visibility: externally_visible prevailing_def_ironly_exp public
  References: _ZN1SC2Ev/1 (alias)
  Referring:
  Read from file: bug.o
  Unit id: 1
  Function flags:
  Called by:
  Calls:
during IPA pass: modref
lto1: internal compiler error: verify_cgraph_node failed
0x97eec0 cgraph_node::verify_node()
        ../../gcc-12-20220424/gcc/cgraph.cc:3874
0x96eb84 symtab_node::verify()
        ../../gcc-12-20220424/gcc/symtab.cc:1359
0x96fcf7 symtab_node::verify_symtab_nodes()
        ../../gcc-12-20220424/gcc/symtab.cc:1387
0xc13224 symtab_node::checking_verify_symtab_nodes()
        ../../gcc-12-20220424/gcc/cgraph.h:682
0xc13224 symbol_table::remove_unreachable_nodes(_IO_FILE*)
        ../../gcc-12-20220424/gcc/ipa.cc:679
0x8f57f5 read_cgraph_and_symbols(unsigned int, char const**)
        ../../gcc-12-20220424/gcc/lto/lto-common.cc:2960
0x8dcdb2 lto_main()
        ../../gcc-12-20220424/gcc/lto/lto.cc:626

$ g++ -v
Using built-in specs.
COLLECT_GCC=/<<NIX>>/gcc-debug-12.0.0/bin/g++
COLLECT_LTO_WRAPPER=/<<NIX>>/gcc-debug-12.0.0/libexec/gcc/x86_64-unknown-linux-gnu/12.0.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with:
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.1 20220424 (experimental) (GCC)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-04-28 13:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 22:27 [Bug lto/105399] New: [12 Regression] -O2/-Ofast -flto ICEs as internal compiler error: verify_cgraph_node failed slyfox at gcc dot gnu.org
2022-04-27  6:10 ` [Bug lto/105399] " rguenth at gcc dot gnu.org
2022-04-27  8:49 ` marxin at gcc dot gnu.org
2022-04-27  9:03 ` jakub at gcc dot gnu.org
2022-04-27  9:08 ` jakub at gcc dot gnu.org
2022-04-27  9:57 ` jakub at gcc dot gnu.org
2022-04-28 13:46 ` cvs-commit at gcc dot gnu.org
2022-04-28 13:49 ` jakub at gcc dot gnu.org

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).