public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/111934] New: ICE  internal compiler error: in discriminator_for_local_entity, at cp/mangle.cc:2065
Date: Mon, 23 Oct 2023 12:09:22 +0000	[thread overview]
Message-ID: <bug-111934-4@http.gcc.gnu.org/bugzilla/> (raw)

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.

             reply	other threads:[~2023-10-23 12:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 12:09 vincenzo.innocente at cern dot ch [this message]
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

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-111934-4@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).