public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "boris at kolpackov dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/98718] [modules] use of partitions causes ICE in write_macro_maps
Date: Mon, 18 Jan 2021 08:43:57 +0000	[thread overview]
Message-ID: <bug-98718-4-O8pjD0MUtQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98718-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from Boris Kolpackov <boris at kolpackov dot net> ---
Perhaps this is the same bug but with a simpler reproducer (it points to the
same location):

cat <<EOF >hello-format.mxx
module;

#include <string>

export module hello:format;

namespace hello
{
  export std::string format (const std::string& n)
  {
    return "Hello, " + n + '!';
  }
}
EOF

cat <<EOF >hello.mxx
module;

#include <string>

export module hello;
export import :format;

namespace hello
{
  export void say (const std::string&);
}
EOF

cat <<EOF >mapper.txt
hello hello.gcm
hello:format hello-format.gcm
EOF

g++ -std=c++2a -fmodules-ts -fmodule-mapper=mapper.txt -x c++ -o
hello-format.gcm.o -c hello-format.mxx
g++ -std=c++2a -fmodules-ts -fmodule-mapper=mapper.txt -x c++ -o hello.gcm.o -c
hello.mxx

hello.mxx:5:8: internal compiler error: in write_macro_maps, at
cp/module.cc:16113
    5 | export module hello;
      |        ^~~~~~
0xc60a67 module_state::write_macro_maps(elf_out*, location_map_info&,
module_state_config*, unsigned int*)
        ../../gcc/gcc/cp/module.cc:16113
0xc659f1 module_state::write(elf_out*, cpp_reader*)
        ../../gcc/gcc/cp/module.cc:17727
0xc6bbfd finish_module_processing(cpp_reader*)
        ../../gcc/gcc/cp/module.cc:19747
0xb8a7a1 c_parse_final_cleanups()
        ../../gcc/gcc/cp/decl2.c:5178
0xf0b805 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1233

  reply	other threads:[~2021-01-18  8:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18  7:37 [Bug c++/98718] New: " boris at kolpackov dot net
2021-01-18  8:43 ` boris at kolpackov dot net [this message]
2021-02-22 15:40 ` [Bug c++/98718] " nathan at gcc dot gnu.org
2021-02-23 18:26 ` nathan at gcc dot gnu.org
2021-02-24 20:46 ` cvs-commit at gcc dot gnu.org
2021-02-24 20:47 ` nathan at gcc dot gnu.org
2021-02-26 12:49 ` nathan at gcc dot gnu.org
2021-02-26 12:49 ` nathan at gcc dot gnu.org
2021-03-04  7:08 ` boris at kolpackov dot net
2021-03-05 18:19 ` nathan 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-98718-4-O8pjD0MUtQ@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).