public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "doko at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/108080] ICE: in core_vals, at cp/module.cc:6262 with -fmodule-header
Date: Wed, 26 Jul 2023 13:37:45 +0000	[thread overview]
Message-ID: <bug-108080-4-QDSqdDWf9A@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108080-4@http.gcc.gnu.org/bugzilla/>

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

Matthias Klose <doko at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doko at gcc dot gnu.org

--- Comment #3 from Matthias Klose <doko at gcc dot gnu.org> ---
seen with trunk 20230718:

$ cat foo.ii
module;
# 1 "" 1 3
namespace std {
template <typename> struct hash;
}
typedef long unsigned size_t;
namespace std {
template <typename, typename> struct pair {
  int second;
  template <typename..., size_t, typename..., size_t> constexpr pair();
};
template <typename _T1, typename _T2>
void operator>(pair<_T1, _T2>, pair<_T1, _T2>);
template <typename> struct __new_allocator {
  allocate___n() { allocate___n > this; }
};
template <typename _Tp> using __allocator_base = __new_allocator<_Tp>;
template <typename> struct allocator : __allocator_base<int> {
  __attribute__allocator() {}
};
template class allocator<wchar_t>;
template <size_t> struct array;
void get(array<1>);
template <class _T1, class _T2>
template <typename..., size_t, typename..., size_t>
constexpr pair<_T1, _T2>::pair() : second(get) {}
struct vector {
  friend hash<vector>;
};
void swap(vector);
template <typename> struct __uniq_ptr_impl {
  swap() { std::swap; }
};
template <typename = int> struct unique_ptr {
  __uniq_ptr_impl<int> pointer;
};
struct shared_ptr {
  operator=(unique_ptr<>);
};
struct __shared_ptr {
  friend shared_ptr;
};
void operator==(__shared_ptr, __shared_ptr);
template <unsigned long> struct array {
  size() { size == 0; }
};
} // namespace std
#pragma GCC optimize ""
namespace std {
struct id {
  friend operator>(id, id);
};
struct hash<id>;
} // namespace std
# 7 "" 2
export module spdlog_wrapper;

$ /usr/lib/gcc-snapshot/bin/g++ -std=c++20 -fmodules-ts -Wall -c foo.ii
foo.ii:7:8: internal compiler error: in core_vals, at cp/module.cc:6262
    7 | namespace std {
      |        ^~~~~~
0x11e5613 trees_out::core_vals(tree_node*)
        ../../src/gcc/cp/module.cc:6262
0x11e6353 trees_out::tree_node_vals(tree_node*)
        ../../src/gcc/cp/module.cc:7218
0x11ec349 trees_out::tree_value(tree_node*)
        ../../src/gcc/cp/module.cc:9083
0x11e8faf trees_out::tree_node(tree_node*)
        ../../src/gcc/cp/module.cc:9281
0x11e59be trees_out::core_vals(tree_node*)
        ../../src/gcc/cp/module.cc:6171
0x11e6353 trees_out::tree_node_vals(tree_node*)
        ../../src/gcc/cp/module.cc:7218
0x11e6cb7 trees_out::decl_value(tree_node*, depset*)
        ../../src/gcc/cp/module.cc:7797
0x11ee50d depset::hash::find_dependencies(module_state*)
        ../../src/gcc/cp/module.cc:13328
0x11eea54 module_state::write_begin(elf_out*, cpp_reader*,
module_state_config&, unsigned int&)
        ../../src/gcc/cp/module.cc:17895
0x79f4e7 finish_module_processing(cpp_reader*)
        ../../src/gcc/cp/module.cc:20237
0x1bc5fd5 c_parse_final_cleanups()
        ../../src/gcc/cp/decl2.cc:5184
0x21034b1 c_common_parse_file()
        ../../src/gcc/c-family/c-opts.cc:1274
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.

  parent reply	other threads:[~2023-07-26 13:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13  6:51 [Bug c++/108080] New: " zsojka at seznam dot cz
2022-12-13  6:53 ` [Bug c++/108080] " pinskia at gcc dot gnu.org
2022-12-13  6:53 ` pinskia at gcc dot gnu.org
2023-07-26 13:37 ` doko at gcc dot gnu.org [this message]
2023-07-26 13:39 ` doko at gcc dot gnu.org
2023-08-14 11:15 ` yagreg7 at gmail dot com
2023-08-14 11:21 ` yagreg7 at gmail dot com
2023-08-14 11:58 ` yagreg7 at gmail dot com
2024-03-06 21:32 ` ppalka at gcc dot gnu.org
2024-03-06 21:33 ` ppalka at gcc dot gnu.org
2024-03-06 21:35 ` ppalka 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-108080-4-QDSqdDWf9A@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).