public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "asolokha at gmx dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/102642] New: [12 Regression] ICE in get, at cgraph.h:2776
Date: Thu, 07 Oct 2021 16:42:19 +0000	[thread overview]
Message-ID: <bug-102642-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 102642
           Summary: [12 Regression] ICE in get, at cgraph.h:2776
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-12.0.0-alpha20211003 snapshot (g:d91056851c5c60f226e3192fb955d018b53eb66f)
ICEs when compiling the following testcase, reduced from
test/SemaCXX/cxx11-thread-local.cpp from the clang 12.0.0 test suite:

thread_local int *z;

void f() {
  extern thread_local int z;
}

% g++-12.0.0 -c ynw1mjy5.cpp
ynw1mjy5.cpp:4:27: error: conflicting declaration 'int z'
    4 |   extern thread_local int z;
      |                           ^
ynw1mjy5.cpp:1:19: note: previous declaration as 'int* z'
    1 | thread_local int *z;
      |                   ^
ynw1mjy5.cpp: In function 'void f()':
ynw1mjy5.cpp:4:27: internal compiler error: in get, at cgraph.h:2776
    4 |   extern thread_local int z;
      |                           ^
0x8774d6 varpool_node::get(tree_node const*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cgraph.h:2776
0x877571 varpool_node::get(tree_node const*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cgraph.h:463
0x877571 varpool_node::get_create(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/varpool.c:145
0x144cd3c set_decl_tls_model(tree_node*, tls_model)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/tree.c:939
0xa89ddf push_local_extern_decl_alias(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/name-lookup.c:3478
0xa8ab34 do_pushdecl
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/name-lookup.c:3831
0xa8cdbb do_pushdecl
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/name-lookup.c:3631
0xa8cdbb pushdecl(tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/name-lookup.c:3854
0xa8cdbb maybe_push_decl(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/name-lookup.c:4160
0x9de1eb start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/decl.c:5690
0xad8767 cp_parser_init_declarator
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/parser.c:22532
0xab2bc4 cp_parser_simple_declaration
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/parser.c:15142
0xab4ccd cp_parser_declaration_statement
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/parser.c:14223
0xab5484 cp_parser_statement
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/parser.c:12315
0xab635d cp_parser_statement_seq_opt
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/parser.c:12722
0xab6438 cp_parser_compound_statement
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/parser.c:12671
0xad7188 cp_parser_function_body
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/parser.c:24902
0xad7188 cp_parser_ctor_initializer_opt_and_function_body
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/parser.c:24953
0xad7f0a cp_parser_function_definition_after_declarator
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/parser.c:31083
0xad928b cp_parser_function_definition_from_specifiers_and_declarator
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/cp/parser.c:30999

             reply	other threads:[~2021-10-07 16:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07 16:42 asolokha at gmx dot com [this message]
2021-10-08  6:10 ` [Bug c++/102642] " rguenth at gcc dot gnu.org
2021-10-11  9:57 ` [Bug c++/102642] [12 Regression] ICE in get, at cgraph.h:2776 since r12-4032-g701075864ac4d1c6 marxin at gcc dot gnu.org
2021-10-11 10:14 ` jakub at gcc dot gnu.org
2021-10-11 10:15 ` [Bug c++/102642] [11/12 " jakub at gcc dot gnu.org
2021-10-11 11:06 ` jakub at gcc dot gnu.org
2021-10-15  2:53 ` cnsun at uwaterloo dot ca
2021-10-17  8:43 ` pinskia at gcc dot gnu.org
2021-10-20  6:40 ` cvs-commit at gcc dot gnu.org
2021-10-20  6:48 ` cvs-commit at gcc dot gnu.org
2021-10-20  6:48 ` jakub 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-102642-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).