public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98057] New: ICE when build clang
@ 2020-11-29 21:14 euloanty at live dot com
  2020-11-30  9:01 ` [Bug ipa/98057] " marxin at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: euloanty at live dot com @ 2020-11-29 21:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98057
           Summary: ICE when build clang
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: euloanty at live dot com
  Target Milestone: ---

|           ~~~~^
../include/llvm/ADT/SparseBitVector.h:54:11: note: while referencing
'llvm::SparseBitVectorElement<128>::Bits'
   54 |   BitWord Bits[BITWORDS_PER_ELEMENT];
      |           ^~~~
[1031/4271] Building CXX object
lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Native/PDBFileBuilder.cpp.o
In file included from ../include/llvm/DebugInfo/PDB/Native/HashTable.h:12,
                 from ../include/llvm/DebugInfo/PDB/Native/NamedStreamMap.h:16,
                 from ../include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h:15,
                 from ../lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp:9:
../include/llvm/ADT/SparseBitVector.h: In member function 'void
llvm::pdb::PDBFileBuilder::commitSrcHeaderBlock(llvm::WritableBinaryStream&,
const llvm::msf::MSFLayout&)':
../include/llvm/ADT/SparseBitVector.h:129:15: warning: array subscript 2 is
above array bounds of 'const BitWord [2]' {aka 'const long unsigned int [2]'}
[-Warray-bounds]
  129 |       if (Bits[i] != 0)
      |           ~~~~^
../include/llvm/ADT/SparseBitVector.h:54:11: note: while referencing
'llvm::SparseBitVectorElement<128>::Bits'
   54 |   BitWord Bits[BITWORDS_PER_ELEMENT];
      |           ^~~~
../include/llvm/ADT/SparseBitVector.h: In member function 'void
llvm::pdb::HashTable<ValueT>::grow(TraitsT&) [with TraitsT =
llvm::pdb::StringTableHashTraits; ValueT = llvm::pdb::SrcHeaderBlockEntry]':
../include/llvm/ADT/SparseBitVector.h:129:15: warning: array subscript 2 is
above array bounds of 'const BitWord [2]' {aka 'const long unsigned int [2]'}
[-Warray-bounds]
  129 |       if (Bits[i] != 0)
      |           ~~~~^
../include/llvm/ADT/SparseBitVector.h:54:11: note: while referencing
'llvm::SparseBitVectorElement<128>::Bits'
   54 |   BitWord Bits[BITWORDS_PER_ELEMENT];
      |           ^~~~
../include/llvm/ADT/SparseBitVector.h: In member function 'llvm::Error
llvm::pdb::PDBFileBuilder::finalizeMsfLayout()':
../include/llvm/ADT/SparseBitVector.h:138:15: warning: array subscript
4294967295 is above array bounds of 'const BitWord [2]' {aka 'const long
unsigned int [2]'} [-Warray-bounds]
  138 |       if (Bits[Idx] != 0)
      |           ~~~~^
../include/llvm/ADT/SparseBitVector.h:54:11: note: while referencing
'llvm::SparseBitVectorElement<128>::Bits'
   54 |   BitWord Bits[BITWORDS_PER_ELEMENT];
      |           ^~~~
../include/llvm/ADT/SparseBitVector.h:138:15: warning: array subscript
4294967295 is above array bounds of 'const BitWord [2]' {aka 'const long
unsigned int [2]'} [-Warray-bounds]
  138 |       if (Bits[Idx] != 0)
      |           ~~~~^
../include/llvm/ADT/SparseBitVector.h:54:11: note: while referencing
'llvm::SparseBitVectorElement<128>::Bits'
   54 |   BitWord Bits[BITWORDS_PER_ELEMENT];
      |           ^~~~
[1035/4271] Building CXX object
lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Native/TpiStream.cpp.o
In file included from ../include/llvm/DebugInfo/PDB/Native/HashTable.h:12,
                 from ../include/llvm/DebugInfo/PDB/Native/TpiStream.h:13,
                 from ../lib/DebugInfo/PDB/Native/TpiStream.cpp:9:
../include/llvm/ADT/SparseBitVector.h: In member function 'llvm::Error
llvm::pdb::HashTable<ValueT>::load(llvm::BinaryStreamReader&) [with ValueT =
llvm::support::detail::packed_endian_specific_integral<unsigned int,
llvm::support::little, 1>]':
../include/llvm/ADT/SparseBitVector.h:129:15: warning: array subscript 2 is
above array bounds of 'const BitWord [2]' {aka 'const long unsigned int [2]'}
[-Warray-bounds]
  129 |       if (Bits[i] != 0)
      |           ~~~~^
../include/llvm/ADT/SparseBitVector.h:54:11: note: while referencing
'llvm::SparseBitVectorElement<128>::Bits'
   54 |   BitWord Bits[BITWORDS_PER_ELEMENT];
      |           ^~~~
../include/llvm/ADT/SparseBitVector.h:129:15: warning: array subscript 2 is
above array bounds of 'const BitWord [2]' {aka 'const long unsigned int [2]'}
[-Warray-bounds]
  129 |       if (Bits[i] != 0)
      |           ~~~~^
../include/llvm/ADT/SparseBitVector.h:54:11: note: while referencing
'llvm::SparseBitVectorElement<128>::Bits'
   54 |   BitWord Bits[BITWORDS_PER_ELEMENT];
      |           ^~~~
[1084/4271] Building CXX object
lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/RTDyldMemoryManager.cpp.
FAILED:
lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/RTDyldMemoryManager.cpp.o
/usr/local/bin/g++  -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/ExecutionEngine/RuntimeDyld
-I../lib/ExecutionEngine/RuntimeDyld -Iinclude -I../include -fPIC
-fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra
-Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough
-Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move
-Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment
-fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG   
-fno-exceptions -fno-rtti -std=c++14 -MD -MT
lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/RTDyldMemoryManager.cpp.o
-MF
lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/RTDyldMemoryManager.cpp.o.d
-o
lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/RTDyldMemoryManager.cpp.o
-c ../lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp
../lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp:295:1: error:
implicit_section flag is set but section isn't
  295 | } // namespace llvm
      | ^
*.LTHUNK4/2647 (void llvm::RTDyldMemoryManager::*.LTHUNK4()) @0x7f0869612dd0
  Type: function definition analyzed alias cpp_implicit_alias
  Visibility: prevailing_def_ironly (implicit_section) artificial
  References: _ZN4llvm18MCJITMemoryManager6anchorEv/2649 (alias)
  Referring:
  Availability: available
  Function flags:
  Called by: _ZThn16_N4llvm19RTDyldMemoryManager6anchorEv/2648
  Calls:
during IPA pass: icf
../lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp:295:1: internal
compiler error: verify_cgraph_node failed
0xbf89d8 cgraph_node::verify_node()
        ../../gcc/gcc/cgraph.c:3807
0xbe7ef4 symtab_node::verify()
        ../../gcc/gcc/symtab.c:1356
0xbe9182 symtab_node::verify_symtab_nodes()
        ../../gcc/gcc/symtab.c:1384
0xe72896 symtab_node::checking_verify_symtab_nodes()
        ../../gcc/gcc/cgraph.h:675
0xe72896 symbol_table::remove_unreachable_nodes(_IO_FILE*)
        ../../gcc/gcc/ipa.c:679
0xf7dd29 execute_todo
        ../../gcc/gcc/passes.c:2107
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
[1097/4271] Building CXX object
lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/RuntimeDyldELF.cpp.o
ninja: build stopped: subcommand failed.

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

* [Bug ipa/98057] ICE when build clang
  2020-11-29 21:14 [Bug c++/98057] New: ICE when build clang euloanty at live dot com
@ 2020-11-30  9:01 ` marxin at gcc dot gnu.org
  2020-11-30  9:06 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-30  9:01 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-11-30
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Can you please provide a pre-processed source file (-E option)?

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

* [Bug ipa/98057] ICE when build clang
  2020-11-29 21:14 [Bug c++/98057] New: ICE when build clang euloanty at live dot com
  2020-11-30  9:01 ` [Bug ipa/98057] " marxin at gcc dot gnu.org
@ 2020-11-30  9:06 ` marxin at gcc dot gnu.org
  2020-11-30  9:23 ` [Bug ipa/98057] [11 Regression] ICE verify_cgraph_node failed since r11-4900-g4656461585bfd0b9 marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-30  9:06 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
             Status|WAITING                     |ASSIGNED

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Not needed, I was able to reproduce it. Reducing now..

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

* [Bug ipa/98057] [11 Regression] ICE verify_cgraph_node failed since r11-4900-g4656461585bfd0b9
  2020-11-29 21:14 [Bug c++/98057] New: ICE when build clang euloanty at live dot com
  2020-11-30  9:01 ` [Bug ipa/98057] " marxin at gcc dot gnu.org
  2020-11-30  9:06 ` marxin at gcc dot gnu.org
@ 2020-11-30  9:23 ` marxin at gcc dot gnu.org
  2020-11-30 12:15 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-30  9:23 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |10.2.0
      Known to fail|                            |11.0
            Summary|ICE when build clang        |[11 Regression] ICE
                   |                            |verify_cgraph_node failed
                   |                            |since
                   |                            |r11-4900-g4656461585bfd0b9
   Target Milestone|---                         |11.0
           Priority|P3                          |P1

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:

$ cat mm.ii
class JITSymbolResolver {
  virtual void anchor();
};
class MemoryManager {
  virtual void anchor();
};
class MCJITMemoryManager : MemoryManager {
  void anchor();
};
class RTDyldMemoryManager : MCJITMemoryManager, JITSymbolResolver {
  void anchor();
};
void RTDyldMemoryManager::anchor() {}
void MCJITMemoryManager::anchor() {}

$ g++ mm.ii -O3 -ffunction-sections -c
mm.ii:14:36: error: implicit_section flag is set but section isn’t
   14 | void MCJITMemoryManager::anchor() {}
      |                                    ^
*.LTHUNK0/1 (void RTDyldMemoryManager::*.LTHUNK0()) @0x7ffff7742440
  Type: function definition analyzed alias cpp_implicit_alias
  Visibility: prevailing_def_ironly (implicit_section) artificial
  References: _ZN18MCJITMemoryManager6anchorEv/3 (alias) 
  Referring: 
  Availability: available
  Function flags:
  Called by: _ZThn8_N19RTDyldMemoryManager6anchorEv/2 (can throw external) 
  Calls: 
during IPA pass: icf
mm.ii:14:36: internal compiler error: verify_cgraph_node failed
0xc05900 cgraph_node::verify_node()
        /home/marxin/Programming/gcc/gcc/cgraph.c:3807
0xbf5974 symtab_node::verify()
        /home/marxin/Programming/gcc/gcc/symtab.c:1356
0xbf6b3e symtab_node::verify_symtab_nodes()
        /home/marxin/Programming/gcc/gcc/symtab.c:1384
0xe6dd86 symtab_node::checking_verify_symtab_nodes()
        /home/marxin/Programming/gcc/gcc/cgraph.h:675
0xe6dd86 symbol_table::remove_unreachable_nodes(_IO_FILE*)
        /home/marxin/Programming/gcc/gcc/ipa.c:679
0xf72e99 execute_todo
        /home/marxin/Programming/gcc/gcc/passes.c:2107
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

I'm gonna fix it.

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

* [Bug ipa/98057] [11 Regression] ICE verify_cgraph_node failed since r11-4900-g4656461585bfd0b9
  2020-11-29 21:14 [Bug c++/98057] New: ICE when build clang euloanty at live dot com
                   ` (2 preceding siblings ...)
  2020-11-30  9:23 ` [Bug ipa/98057] [11 Regression] ICE verify_cgraph_node failed since r11-4900-g4656461585bfd0b9 marxin at gcc dot gnu.org
@ 2020-11-30 12:15 ` marxin at gcc dot gnu.org
  2020-12-01 10:25 ` cvs-commit at gcc dot gnu.org
  2020-12-01 10:26 ` marxin at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-30 12:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
I've got a patch candidate.

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

* [Bug ipa/98057] [11 Regression] ICE verify_cgraph_node failed since r11-4900-g4656461585bfd0b9
  2020-11-29 21:14 [Bug c++/98057] New: ICE when build clang euloanty at live dot com
                   ` (3 preceding siblings ...)
  2020-11-30 12:15 ` marxin at gcc dot gnu.org
@ 2020-12-01 10:25 ` cvs-commit at gcc dot gnu.org
  2020-12-01 10:26 ` marxin at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-01 10:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:cbc4ae2b263bced781a2d2d0cf0085d262040db6

commit r11-5600-gcbc4ae2b263bced781a2d2d0cf0085d262040db6
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Nov 30 13:07:27 2020 +0100

    IPA: drop implicit_section again

    As mentioned in the PR, since 4656461585bfd0b9 implicit_section
    was not set to false when set_section was called with the argument
    equal to NULL.

    gcc/ChangeLog:

            PR ipa/98057
            * symtab.c (symtab_node::set_section_for_node): Drop
            implicit_section if x_section is NULL.

    gcc/testsuite/ChangeLog:

            PR ipa/98057
            * g++.dg/ipa/pr98057.C: New test.

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

* [Bug ipa/98057] [11 Regression] ICE verify_cgraph_node failed since r11-4900-g4656461585bfd0b9
  2020-11-29 21:14 [Bug c++/98057] New: ICE when build clang euloanty at live dot com
                   ` (4 preceding siblings ...)
  2020-12-01 10:25 ` cvs-commit at gcc dot gnu.org
@ 2020-12-01 10:26 ` marxin at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-01 10:26 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on master.

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

end of thread, other threads:[~2020-12-01 10:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-29 21:14 [Bug c++/98057] New: ICE when build clang euloanty at live dot com
2020-11-30  9:01 ` [Bug ipa/98057] " marxin at gcc dot gnu.org
2020-11-30  9:06 ` marxin at gcc dot gnu.org
2020-11-30  9:23 ` [Bug ipa/98057] [11 Regression] ICE verify_cgraph_node failed since r11-4900-g4656461585bfd0b9 marxin at gcc dot gnu.org
2020-11-30 12:15 ` marxin at gcc dot gnu.org
2020-12-01 10:25 ` cvs-commit at gcc dot gnu.org
2020-12-01 10:26 ` marxin 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).