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++/98116] New: [11 Regression] ICE in strip_typedefs, at cp/tree.c:1744 since r11-5663-g329ae1d7751346ba
Date: Thu, 03 Dec 2020 09:31:20 +0000	[thread overview]
Message-ID: <bug-98116-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 98116
           Summary: [11 Regression] ICE in strip_typedefs, at
                    cp/tree.c:1744 since r11-5663-g329ae1d7751346ba
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: nathan at gcc dot gnu.org
  Target Milestone: ---

The following is reduced from chromium:

$ cat file_path.ii
namespace std {
struct is_convertible;
template <typename _Tp> using remove_pointer_t = typename _Tp ::type;
template <bool> struct enable_if;
template <typename> void declval();
template <bool _Cond> using enable_if_t = typename enable_if<_Cond>::type;
template <typename, typename> class Trans_NS___cxx11_basic_string {
  long _M_string_length;
};
} // namespace std
struct string16_char_traits;
template class std::Trans_NS___cxx11_basic_string<unsigned short,
                                                  string16_char_traits>;
template <typename, typename> using IsLegalDataConversion =
std::is_convertible;
template <typename Container, typename T>
using ContainerHasConvertibleData = IsLegalDataConversion<
    std::remove_pointer_t<decltype(std::declval<Container>)>, T>;
template <typename Array, typename T, long>
using EnableIfSpanCompatibleArray =
    std::enable_if_t<ContainerHasConvertibleData<Array, T>::value>;
template <int Extent> class span {
  template <long N, EnableIfSpanCompatibleArray<
                        const std::Trans_NS___cxx11_basic_string<
                            unsigned short, string16_char_traits>[N],
                        std::Trans_NS___cxx11_basic_string<short, int>,
Extent>>
  span();
};

$ g++ file_path.ii -c
file_path.ii:25:73: internal compiler error: in strip_typedefs, at
cp/tree.c:1744
   25 |                         std::Trans_NS___cxx11_basic_string<short, int>,
Extent>>
      |                                                                        
^~~~~~
0x6dd571 strip_typedefs(tree_node*, bool*, unsigned int)
        /home/marxin/Programming/gcc/gcc/cp/tree.c:1744
0xa3cbb2 canonicalize_type_argument(tree_node*, int)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:8121
0xa3cbb2 canonicalize_type_argument(tree_node*, int)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:8116
0xa74cf3 coerce_template_parms
        /home/marxin/Programming/gcc/gcc/cp/pt.c:8965
0xa6e496 instantiate_alias_template
        /home/marxin/Programming/gcc/gcc/cp/pt.c:20991
0xa6e496 tsubst(tree_node*, tree_node*, int, tree_node*)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:15322
0xa7816e lookup_template_class_1
        /home/marxin/Programming/gcc/gcc/cp/pt.c:9907
0xa7964c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:10190
0xaa063b finish_template_type(tree_node*, tree_node*, int)
        /home/marxin/Programming/gcc/gcc/cp/semantics.c:3442
0xa18b11 cp_parser_template_id
        /home/marxin/Programming/gcc/gcc/cp/parser.c:16994
0xa18cfc cp_parser_class_name
        /home/marxin/Programming/gcc/gcc/cp/parser.c:24216
0xa14c45 cp_parser_qualifying_entity
        /home/marxin/Programming/gcc/gcc/cp/parser.c:6864
0xa14c45 cp_parser_nested_name_specifier_opt
        /home/marxin/Programming/gcc/gcc/cp/parser.c:6546
0xa036be cp_parser_constructor_declarator_p
        /home/marxin/Programming/gcc/gcc/cp/parser.c:29163
0xa036be cp_parser_decl_specifier_seq
        /home/marxin/Programming/gcc/gcc/cp/parser.c:14576
0xa2122e cp_parser_parameter_declaration
        /home/marxin/Programming/gcc/gcc/cp/parser.c:23278
0xa222bb cp_parser_template_parameter
        /home/marxin/Programming/gcc/gcc/cp/parser.c:16569
0xa222bb cp_parser_template_parameter_list
        /home/marxin/Programming/gcc/gcc/cp/parser.c:16160
0xa2cda2 cp_parser_explicit_template_declaration
        /home/marxin/Programming/gcc/gcc/cp/parser.c:29828
0x9fff48 cp_parser_member_specification_opt
        /home/marxin/Programming/gcc/gcc/cp/parser.c:25313
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:[~2020-12-03  9:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03  9:31 marxin at gcc dot gnu.org [this message]
2020-12-03  9:31 ` [Bug c++/98116] " marxin at gcc dot gnu.org
2020-12-03 12:34 ` nathan at gcc dot gnu.org
2020-12-03 16:43 ` cvs-commit at gcc dot gnu.org
2020-12-03 16:44 ` nathan at gcc dot gnu.org
2020-12-04 15:27 ` nathan at gcc dot gnu.org
2020-12-04 16:39 ` cvs-commit at gcc dot gnu.org
2020-12-07 16:49 ` cvs-commit at gcc dot gnu.org
2020-12-07 16:51 ` 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-98116-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).