public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101030] New: gcc internal error with Wconversion
@ 2021-06-11 12:24 chrishair85 at gmail dot com
  2021-08-12 23:19 ` [Bug c++/101030] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: chrishair85 at gmail dot com @ 2021-06-11 12:24 UTC (permalink / raw)
  To: gcc-bugs

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-03-30 14:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 12:24 [Bug c++/101030] New: gcc internal error with Wconversion chrishair85 at gmail dot com
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

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).