public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/98899] [10/11 Regression] ICE in tsubst_copy, at cp/pt.c:16198 since r10-1280-g78f7607db4c53f8c
Date: Mon, 01 Feb 2021 08:53:24 +0000	[thread overview]
Message-ID: <bug-98899-4-OuFtJn2ax8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98899-4@http.gcc.gnu.org/bugzilla/>

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.3
             Status|UNCONFIRMED                 |NEW
            Summary|ICE: Illegal instruction: 4 |[10/11 Regression] ICE in
                   |"error: could not convert   |tsubst_copy, at
                   |'<unparsed>' from           |cp/pt.c:16198 since
                   |''<invalid tree code>'" on  |r10-1280-g78f7607db4c53f8c
                   |macOS                       |
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org
   Last reconfirmed|                            |2021-02-01
           Keywords|                            |ice-on-valid-code
     Ever confirmed|0                           |1
      Known to work|                            |9.3.0
      Known to fail|                            |10.2.0, 11.0

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Thank you for the bug report.

Reduce test-case:

$ cat pr98899.ii
template <int __v> struct integral_constant {
  static constexpr int value = __v;
};
template <typename> struct conditional;
template <typename...> struct __and_;
template <typename _B1, typename _B2>
struct __and_<_B1, _B2> : conditional<_B1>::type {};
template <typename...>
struct __is_nt_constructible_impl : integral_constant<0> {};
template <typename... _Args>
struct is_nothrow_constructible
    : __and_<int, __is_nt_constructible_impl<_Args...>> {};
template <typename> struct conditional {
  typedef __is_nt_constructible_impl<> type;
};
class locale {
  struct token {
    enum {} typedef yytokentype;
  };
  template <typename Base> struct basic_symbol {
    basic_symbol(typename Base::kind_type,
                 int) noexcept(is_nothrow_constructible<>::value);
  };
  struct by_kind {
    typedef token::yytokentype kind_type;
  };
  struct symbol_type : basic_symbol<by_kind> {
    int symbol_type_v;
    symbol_type() : basic_symbol(token::yytokentype(), symbol_type_v) {}
  };
};

$ g++ pr98899.ii -c -Werror
pr98899.ii: In instantiation of
‘locale::basic_symbol<Base>::basic_symbol(typename Base::kind_type, int) [with
Base = locale::by_kind; typename Base::kind_type =
locale::token::yytokentype]’:
pr98899.ii:29:69:   required from here
pr98899.ii:21:5: internal compiler error: in tsubst_copy, at cp/pt.c:17205
   21 |     basic_symbol(typename Base::kind_type,
      |     ^~~~~~~~~~~~
0x6e0e47 tsubst_copy
        /home/marxin/Programming/gcc/gcc/cp/pt.c:17205
0xb24f7e tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:20789
0xb28755 maybe_instantiate_noexcept(tree_node*, int)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:25592
0xb2833c maybe_instantiate_noexcept(tree_node*, int)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:25535
0xa194ca mark_used(tree_node*, int)
        /home/marxin/Programming/gcc/gcc/cp/decl2.c:5610
0x9623a5 build_over_call
        /home/marxin/Programming/gcc/gcc/cp/call.c:9351
0x95f722 build_new_method_call_1
        /home/marxin/Programming/gcc/gcc/cp/call.c:10637
0x95f722 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
        /home/marxin/Programming/gcc/gcc/cp/call.c:10712
0x960a86 build_special_member_call(tree_node*, tree_node*, vec<tree_node*,
va_gc, vl_embed>**, tree_node*, int, int)
        /home/marxin/Programming/gcc/gcc/cp/call.c:10113
0xa385ca expand_default_init
        /home/marxin/Programming/gcc/gcc/cp/init.c:1983
0xa385ca expand_aggr_init_1
        /home/marxin/Programming/gcc/gcc/cp/init.c:2098
0xa3fb1b emit_mem_initializers(tree_node*)
        /home/marxin/Programming/gcc/gcc/cp/init.c:1354
0xaf39b9 cp_parser_mem_initializer_list
        /home/marxin/Programming/gcc/gcc/cp/parser.c:15907
0xaf39b9 cp_parser_ctor_initializer_opt
        /home/marxin/Programming/gcc/gcc/cp/parser.c:15815
0xaf39b9 cp_parser_ctor_initializer_opt_and_function_body
        /home/marxin/Programming/gcc/gcc/cp/parser.c:24027
0xaf511a cp_parser_function_definition_after_declarator
        /home/marxin/Programming/gcc/gcc/cp/parser.c:29938
0xaf5624 cp_parser_late_parsing_for_member
        /home/marxin/Programming/gcc/gcc/cp/parser.c:30845
0xacea63 cp_parser_class_specifier_1
        /home/marxin/Programming/gcc/gcc/cp/parser.c:25104
0xacfa7b cp_parser_class_specifier
        /home/marxin/Programming/gcc/gcc/cp/parser.c:25128
0xacfa7b cp_parser_type_specifier
        /home/marxin/Programming/gcc/gcc/cp/parser.c:18381
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.

  parent reply	other threads:[~2021-02-01  8:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-31  6:17 [Bug c++/98899] New: ICE: Illegal instruction: 4 "error: could not convert '<unparsed>' from ''<invalid tree code>'" on macOS akim.demaille at gmail dot com
2021-01-31  6:20 ` [Bug c++/98899] " akim.demaille at gmail dot com
2021-01-31  6:21 ` akim.demaille at gmail dot com
2021-02-01  8:53 ` marxin at gcc dot gnu.org [this message]
2021-02-01 13:15 ` [Bug c++/98899] [10/11 Regression] ICE in tsubst_copy, at cp/pt.c:16198 since r10-1280-g78f7607db4c53f8c ppalka at gcc dot gnu.org
2021-02-01 13:28 ` mpolacek at gcc dot gnu.org
2021-02-03 15:17 ` cvs-commit at gcc dot gnu.org
2021-02-03 15:22 ` [Bug c++/98899] [10 " mpolacek at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-04-09 22:57 ` mpolacek 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-98899-4-OuFtJn2ax8@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).