public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/104647] New: [9/10/11/12 Regression] ICE in get_or_insert_ctor_field, at cp/constexpr.cc:3705
Date: Tue, 22 Feb 2022 19:32:13 +0000	[thread overview]
Message-ID: <bug-104647-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 104647
           Summary: [9/10/11/12 Regression] ICE in
                    get_or_insert_ctor_field, at cp/constexpr.cc:3705
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Seems to have started between 20181104 and 20181111 :
(gcc configured with --enable-checking=yes)


$ cat z1.cc
struct A { int i; int f(); };
typedef int A::*MemPtr;
typedef int (A::*MemFuncPtr)();
struct B { MemPtr a[3]; MemFuncPtr b[3]; };
template <B> struct X {};
template <typename T>
typedef X<B{{}, { MemFuncPtr{ nullptr }}}> XB;


$ cat z2.cc
struct A { int i; int f(); };
typedef int A::*MemPtr;
typedef int (A::*MemFuncPtr)();
struct B { MemPtr a[3]; MemFuncPtr b[3]; };
template <B> struct X {};
template <typename T>
typedef X<B{{}, { MemFuncPtr{ 0 }}}> XB;


$ cat za1.cc
struct A typedef *MemPtr;
typedef (A::*MemFuncPtr) ();
struct B { int *b; MemFuncPtr c; };
template <B<B{{}, MemFuncPtr {nullptr}};


$ g++-12-20220220 -c z1.cc -std=c++20   # or -std=c++2a
z1.cc:7:41: internal compiler error: Segmentation fault
    7 | typedef X<B{{}, { MemFuncPtr{ nullptr }}}> XB;
      |                                         ^
0x10ca74f crash_signal
        ../../gcc/toplev.cc:322
0x76d8b2 get_or_insert_ctor_field
        ../../gcc/cp/constexpr.cc:3705
0x784b33 cxx_eval_bare_aggregate
        ../../gcc/cp/constexpr.cc:4825
0x774b40 cxx_eval_constant_expression
        ../../gcc/cp/constexpr.cc:7110
0x779ec3 cxx_eval_outermost_constant_expr
        ../../gcc/cp/constexpr.cc:7706
0x77f270 fold_non_dependent_expr_template
        ../../gcc/cp/constexpr.cc:8065
0x77f7a4 fold_non_dependent_init(tree_node*, int, bool, tree_node*)
        ../../gcc/cp/constexpr.cc:8143
0xa59638 massage_init_elt
        ../../gcc/cp/typeck2.cc:1437
0xa599d4 process_init_constructor_array
        ../../gcc/cp/typeck2.cc:1502
0xa57c9a process_init_constructor
        ../../gcc/cp/typeck2.cc:1917
0xa57c9a digest_init_r
        ../../gcc/cp/typeck2.cc:1325
0xa59627 massage_init_elt
        ../../gcc/cp/typeck2.cc:1434
0xa5811b process_init_constructor_record
        ../../gcc/cp/typeck2.cc:1651
0xa5811b process_init_constructor
        ../../gcc/cp/typeck2.cc:1920
0xa5811b digest_init_r
        ../../gcc/cp/typeck2.cc:1325
0x9ddc3e finish_compound_literal(tree_node*, tree_node*, int, fcl_t)
        ../../gcc/cp/semantics.cc:3220
0x8fd33b cp_parser_functional_cast
        ../../gcc/cp/parser.cc:31832
0x91195d cp_parser_postfix_expression
        ../../gcc/cp/parser.cc:7578
0x928a01 cp_parser_unary_expression
        ../../gcc/cp/parser.cc:9035
0x8f63df cp_parser_cast_expression
        ../../gcc/cp/parser.cc:9939

             reply	other threads:[~2022-02-22 19:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 19:32 gscfq@t-online.de [this message]
2022-02-22 21:48 ` [Bug c++/104647] " mpolacek at gcc dot gnu.org
2022-02-22 21:49 ` mpolacek at gcc dot gnu.org
2022-02-23  8:23 ` rguenth at gcc dot gnu.org
2022-02-24 15:30 ` [Bug c++/104647] [9/10/11/12 Regression] ICE in get_or_insert_ctor_field, at cp/constexpr.cc:3705 since r9-3836-g4be5c72cf3ea3ee9 marxin at gcc dot gnu.org
2022-05-27  9:47 ` [Bug c++/104647] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:48 ` jakub at gcc dot gnu.org
2023-02-02 15:43 ` mpolacek at gcc dot gnu.org
2023-02-02 15:51 ` pinskia 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-104647-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).