public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/111934] New: ICE  internal compiler error: in discriminator_for_local_entity, at cp/mangle.cc:2065
@ 2023-10-23 12:09 vincenzo.innocente at cern dot ch
  2023-10-23 12:09 ` [Bug c++/111934] " vincenzo.innocente at cern dot ch
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2023-10-23 12:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111934
           Summary: ICE  internal compiler error: in
                    discriminator_for_local_entity, at cp/mangle.cc:2065
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincenzo.innocente at cern dot ch
  Target Milestone: ---

#ifdef ICE
#include <iostream>
#endif

struct  Me {

  static Me & me() {
    thread_local auto me = std::make_unique_ptr<Me>();
    return *me;
  }

};


int main() {
  return 0;
}

c++ -O3 -Wall -pthread ice13.cpp
ice13.cpp: In static member function 'static Me& Me::me()':
ice13.cpp:8:33: error: 'make_unique_ptr' is not a member of 'std'
    8 |     thread_local auto me = std::make_unique_ptr<Me>();
      |                                 ^~~~~~~~~~~~~~~
ice13.cpp:8:51: error: expected primary-expression before '>' token
    8 |     thread_local auto me = std::make_unique_ptr<Me>();
      |                                                   ^
ice13.cpp:8:53: error: expected primary-expression before ')' token
    8 |     thread_local auto me = std::make_unique_ptr<Me>();
      |                                                     ^


======================================================================


ctest]$ c++ -O3 -Wall -pthread ice13.cpp -DICE
ice13.cpp: In static member function 'static Me& Me::me()':
ice13.cpp:8:33: error: 'make_unique_ptr' is not a member of 'std'
    8 |     thread_local auto me = std::make_unique_ptr<Me>();
      |                                 ^~~~~~~~~~~~~~~
ice13.cpp:8:51: error: expected primary-expression before '>' token
    8 |     thread_local auto me = std::make_unique_ptr<Me>();
      |                                                   ^
ice13.cpp:8:53: error: expected primary-expression before ')' token
    8 |     thread_local auto me = std::make_unique_ptr<Me>();
      |                                                     ^
ice13.cpp: At global scope:
ice13.cpp:8:23: internal compiler error: in discriminator_for_local_entity, at
cp/mangle.cc:2065
    8 |     thread_local auto me = std::make_unique_ptr<Me>();
      |                       ^~
0x7de25d discriminator_for_local_entity
        ../../gcc_src/gcc/cp/mangle.cc:2065
0xb92a4a write_local_name
        ../../gcc_src/gcc/cp/mangle.cc:2164
0xb92a4a write_name
        ../../gcc_src/gcc/cp/mangle.cc:1071
0xb94e46 write_encoding
        ../../gcc_src/gcc/cp/mangle.cc:864
0xb94f5b write_mangled_name
        ../../gcc_src/gcc/cp/mangle.cc:810
0xb95740 mangle_decl_string
        ../../gcc_src/gcc/cp/mangle.cc:4092
0xb9592a get_mangled_id
        ../../gcc_src/gcc/cp/mangle.cc:4113
0xb9592a mangle_decl(tree_node*)
        ../../gcc_src/gcc/cp/mangle.cc:4151
0x16512bd decl_assembler_name(tree_node*)
        ../../gcc_src/gcc/tree.cc:715
0xe4a329 symbol_table::insert_to_assembler_name_hash(symtab_node*, bool)
        ../../gcc_src/gcc/symtab.cc:175
0xe4a48c symbol_table::symtab_initialize_asm_name_hash()
        ../../gcc_src/gcc/symtab.cc:267
0xe4ae84 symbol_table::symtab_initialize_asm_name_hash()
        ../../gcc_src/gcc/symtab.cc:1078
0xe4ae84 symtab_node::get_for_asmname(tree_node const*)
        ../../gcc_src/gcc/symtab.cc:1066
0xe5fc61 handle_alias_pairs
        ../../gcc_src/gcc/cgraphunit.cc:1528
0xe64fa7 symbol_table::finalize_compilation_unit()
        ../../gcc_src/gcc/cgraphunit.cc:2541
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.

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

end of thread, other threads:[~2023-11-13  0:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23 12:09 [Bug c++/111934] New: ICE internal compiler error: in discriminator_for_local_entity, at cp/mangle.cc:2065 vincenzo.innocente at cern dot ch
2023-10-23 12:09 ` [Bug c++/111934] " vincenzo.innocente at cern dot ch
2023-10-23 17:14 ` pinskia at gcc dot gnu.org
2023-10-24  9:31 ` vincenzo.innocente at cern dot ch
2023-11-12 23:33 ` pinskia at gcc dot gnu.org
2023-11-12 23:37 ` pinskia at gcc dot gnu.org
2023-11-12 23:42 ` pinskia at gcc dot gnu.org
2023-11-12 23:53 ` pinskia at gcc dot gnu.org
2023-11-12 23:59 ` pinskia at gcc dot gnu.org
2023-11-13  0:01 ` [Bug c++/111934] ICE internal compiler error: in discriminator_for_local_entity after undefined decl defining a `thread_local auto` and weakref/alias attribute had been used before pinskia 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).