public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "egor.pugin at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/103752] New: [12 Regression][ICE][modules] with import <string>
Date: Thu, 16 Dec 2021 17:14:02 +0000	[thread overview]
Message-ID: <bug-103752-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 103752
           Summary: [12 Regression][ICE][modules] with import <string>
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: egor.pugin at gmail dot com
  Target Milestone: ---

Created attachment 52017
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52017&action=edit
repro

export module x;
import <string>;
std::pair<std::string, std::string> environment;

gcc11 works fine, gcc from master gives an ICE.

In file included from
/home/egor/dev/gcc/build/install/include/c++/12.0.0/bits/stl_algobase.h:64,
                 from
/home/egor/dev/gcc/build/install/include/c++/12.0.0/bits/char_traits.h:39,
                 from
/home/egor/dev/gcc/build/install/include/c++/12.0.0/string:40,
of module /home/egor/dev/gcc/build/install/include/c++/12.0.0/string, imported
at crash.cpp:2:
/home/egor/dev/gcc/build/install/include/c++/12.0.0/bits/stl_pair.h: In
instantiation of ‘struct std::pair<std::__cxx11::basic_string<char>,
std::__cxx11::basic_string<char> >’:
crash.cpp:3:37:   required from here
/home/egor/dev/gcc/build/install/include/c++/12.0.0/bits/stl_pair.h:242:7:
internal compiler error: Segmentation fault
  242 |       pair()
      |       ^~~~
0x1140a2f crash_signal
        ../../gcc/toplev.c:322
0xb01b55 hash_table_mod1(unsigned int, unsigned int)
        ../../gcc/hash-table.h:344
0xb01b55 hash_table<hash_map<tree_node*, tree_node*,
decl_tree_cache_traits>::hash_entry, false,
xcallocator>::find_with_hash(tree_node* const&, unsigned int)
        ../../gcc/hash-table.h:914
0xb01b55 hash_map<tree_node*, tree_node*,
decl_tree_cache_traits>::get(tree_node* const&)
        ../../gcc/hash-map.h:189
0xb01b55 lookup_explicit_specifier
        ../../gcc/cp/pt.c:13787
0xb01b55 tsubst_function_decl
        ../../gcc/cp/pt.c:14012
0xb051c2 tsubst_decl
        ../../gcc/cp/pt.c:14439
0xb33a79 instantiate_class_template_1
        ../../gcc/cp/pt.c:12020
0xb35112 instantiate_class_template(tree_node*)
        ../../gcc/cp/pt.c:12306
0xb83b79 complete_type(tree_node*)
        ../../gcc/cp/typeck.c:143
0x9b9055 start_decl_1(tree_node*, bool)
        ../../gcc/cp/decl.c:5771
0x9b9055 start_decl_1(tree_node*, bool)
        ../../gcc/cp/decl.c:5750
0x9d90b0 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
        ../../gcc/cp/decl.c:5737
0xaceda2 cp_parser_init_declarator
        ../../gcc/cp/parser.c:22529
0xaaa393 cp_parser_simple_declaration
        ../../gcc/cp/parser.c:15155
0xada635 cp_parser_declaration
        ../../gcc/cp/parser.c:14841
0xadb04a cp_parser_toplevel_declaration
        ../../gcc/cp/parser.c:14862
0xadb04a cp_parser_translation_unit
        ../../gcc/cp/parser.c:4986
0xadb04a c_parse_file()
        ../../gcc/cp/parser.c:47839
0xc0838d c_common_parse_file()
        ../../gcc/c-family/c-opts.c:1237
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.

             reply	other threads:[~2021-12-16 17:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 17:14 egor.pugin at gmail dot com [this message]
2021-12-16 21:14 ` [Bug c++/103752] " pinskia at gcc dot gnu.org
2022-01-17 12:53 ` rguenth at gcc dot gnu.org
2022-01-17 13:13 ` redi at gcc dot gnu.org
2022-02-09  2:25 ` jason at gcc dot gnu.org
2022-02-09 15:41 ` cvs-commit at gcc dot gnu.org
2022-02-09 15:41 ` jason at gcc dot gnu.org
2022-02-09 15:45 ` johelegp at gmail dot com
2022-02-09 16:32 ` johelegp at gmail dot com
2022-10-12 11:31 ` redi 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-103752-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).