public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "chrishair85 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/101030] New: gcc internal error with Wconversion
Date: Fri, 11 Jun 2021 12:24:30 +0000	[thread overview]
Message-ID: <bug-101030-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 101030
           Summary: gcc internal error with Wconversion
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chrishair85 at gmail dot com
  Target Milestone: ---

template <int N>
struct jj {
    int ii[N ?: 1];
};

int main() {
    jj<2> kk;
}

g++ -Wconversion dies with
version 8 to 11

changing template<int N> to template<unsigned long N> makes it work

Regards

<source>:4:18: internal compiler error: Segmentation fault
    4 |     int ii[N ?: 1];
      |                  ^
0x1780bf9 internal_error(char const*, ...)
        ???:0
0x6d96a9 cp_convert_and_check(tree_node*, tree_node*, int)
        ???:0
0x6f2dc8 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
        ???:0
0x707dd4 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
        ???:0
0x7c0cab c_parse_file()
        ???:0
0x892aa2 c_common_parse_file()
        ???:0
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.
Compiler returned: 1

Rgds

             reply	other threads:[~2021-06-11 12:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11 12:24 chrishair85 at gmail dot com [this message]
2021-08-12 23:19 ` [Bug c++/101030] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2021-08-12 23:33 ` [Bug c++/101030] [9/10/11/12 Regression] ICE with -Wconversion and a?:b extension in template argument pinskia at gcc dot gnu.org
2022-01-17 14:36 ` rguenth at gcc dot gnu.org
2022-03-29 14:51 ` mpolacek at gcc dot gnu.org
2022-03-30 14:23 ` cvs-commit at gcc dot gnu.org
2022-03-30 14:24 ` [Bug c++/101030] [9/10/11 " mpolacek at gcc dot gnu.org
2022-03-30 14:27 ` cvs-commit at gcc dot gnu.org
2022-03-30 14:28 ` [Bug c++/101030] [9/10 " 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-101030-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).