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

            Bug ID: 92809
           Summary: [10 regression] error: calls_comdat_local is set
                    outside of a comdat group
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dimhen at gmail dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

r278936 PASS
r278958 FAIL

Maybe dup PR86905?

$ $ cat x.ii
struct a {
  int operator!=(a);
};
template <typename b> struct c : a {
  b operator*();
  void operator++();
};
template <typename d> struct e {
  using f = c<d>;
  f begin();
  f end();
};
struct g {
  virtual void anchor();
};
struct h {
  e<int *> i;
  virtual void j(int &);
  void k();
};
struct l : g, h {
  void j(int &) {}
};
void h::k() {
  for (auto m : i)
    j(*m);
}

$ g++ -fpreprocessed -O2 -std=c++11 -fchecking=1 -c x.ii
x.ii:27:1: error: calls_comdat_local is set outside of a comdat group
   27 | }
      | ^
_ZThn8_N1l1jERi/2 (virtual void l::_ZThn8_N1l1jERi(int&)) @0x7f578fca12d0
  Type: function
  Body removed by symtab_remove_unreachable_nodes
  Visibility: externally_visible public weak comdat comdat_group:_ZN1l1jERi
one_only section:.text._ZN1l1jERi (implicit_section) virtual artificial
  References: 
  Referring: 
  Availability: not_available
  Function flags: calls_comdat_local indirect_call_target
  Former thunk fixed offset -8 virtual value 0 indirect_offset 0 has virtual
offset 0
  Called by: 
  Calls: 
during IPA pass: inline
x.ii:27:1: internal compiler error: verify_cgraph_node failed
0xd7a956 cgraph_node::verify_node()
        /home/dimhen/src/gcc_current/gcc/cgraph.c:3444
0xd6ea94 symtab_node::verify()
        /home/dimhen/src/gcc_current/gcc/symtab.c:1279
0xd6fbbe symtab_node::verify_symtab_nodes()
        /home/dimhen/src/gcc_current/gcc/symtab.c:1299
0xff0290 symtab_node::checking_verify_symtab_nodes()
        /home/dimhen/src/gcc_current/gcc/cgraph.h:650
0xff0290 symbol_table::remove_unreachable_nodes(_IO_FILE*)
        /home/dimhen/src/gcc_current/gcc/ipa.c:672
0x1b893f6 ipa_inline
        /home/dimhen/src/gcc_current/gcc/ipa-inline.c:2695
0x1b893f6 execute
        /home/dimhen/src/gcc_current/gcc/ipa-inline.c:3088
Please submit a full bug report,

g++ -v                                                
Using built-in specs.
COLLECT_GCC=/home/dimhen/arch-gcc/gcc_current/bin/g++
COLLECT_LTO_WRAPPER=/home/dimhen/arch-gcc/gcc_current/libexec/gcc/x86_64-pc-linux-gnu/10.0.0/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
Target: x86_64-pc-linux-gnu
Configured with: /home/dimhen/src/gcc_current/configure
--prefix=/home/dimhen/arch-gcc/gcc_current
--enable-checking=yes,df,fold,rtl,extra --enable-languages=c,c++,lto
--disable-multilib --enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-gnu-indirect-function --enable-cet --with-tune=native
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.0 20191204 (experimental) [trunk revision 278958] (GCC)

Reply via email to