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++/105529] New: [13 Regression] cxx_eval_store_expression, at cp/constexpr.cc:5928 since r13-160-g967cdbe6629653
Date: Mon, 09 May 2022 07:47:08 +0000	[thread overview]
Message-ID: <bug-105529-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 105529
           Summary: [13 Regression] cxx_eval_store_expression, at
                    cp/constexpr.cc:5928 since r13-160-g967cdbe6629653
           Product: gcc
           Version: 12.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: jason at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-linux-gnu
            Target: arm-linux-eabi

The following crashes with the given cross compiler:

$ cat sstream-inst.ii
struct allocator {
  constexpr ~allocator() {}
};
struct Trans_NS___cxx11_basic_string {
  Trans_NS___cxx11_basic_string(int, int, allocator = allocator());
};
void to_string() { Trans_NS___cxx11_basic_string(0, '\0'); }

$ ./xg++ -B. sstream-inst.ii -c -std=gnu++20 -O
sstream-inst.ii: In function ‘void to_string()’:
sstream-inst.ii:7:60:   in ‘constexpr’ expansion of
‘<anonymous>.allocator::~allocator()’
sstream-inst.ii:7:60: internal compiler error: in cxx_eval_store_expression, at
cp/constexpr.cc:5928
    7 | void to_string() { Trans_NS___cxx11_basic_string(0, '\0'); }
      |                                                            ^
0xb8412a cxx_eval_store_expression
        /home/marxin/Programming/gcc/gcc/cp/constexpr.cc:5928
0xb87c46 cxx_eval_constant_expression
        /home/marxin/Programming/gcc/gcc/cp/constexpr.cc:6848
0xb87d41 cxx_eval_constant_expression
        /home/marxin/Programming/gcc/gcc/cp/constexpr.cc:6860
0xb8503f cxx_eval_statement_list
        /home/marxin/Programming/gcc/gcc/cp/constexpr.cc:6178
0xb8a158 cxx_eval_constant_expression
        /home/marxin/Programming/gcc/gcc/cp/constexpr.cc:7407
0xb87f45 cxx_eval_constant_expression
        /home/marxin/Programming/gcc/gcc/cp/constexpr.cc:6906
0xb76e4c cxx_eval_call_expression
        /home/marxin/Programming/gcc/gcc/cp/constexpr.cc:2855
0xb87084 cxx_eval_constant_expression
        /home/marxin/Programming/gcc/gcc/cp/constexpr.cc:6719
0xb8c200 cxx_eval_outermost_constant_expr
        /home/marxin/Programming/gcc/gcc/cp/constexpr.cc:7824
0xb8d06e maybe_constant_value(tree_node*, tree_node*, bool)
        /home/marxin/Programming/gcc/gcc/cp/constexpr.cc:8102
0xbcff2b cp_fold
        /home/marxin/Programming/gcc/gcc/cp/cp-gimplify.cc:2880
0xbcddd2 cp_fold
        /home/marxin/Programming/gcc/gcc/cp/cp-gimplify.cc:2467
0xbc6c66 cp_fold_r
        /home/marxin/Programming/gcc/gcc/cp/cp-gimplify.cc:1011
0x1b91df5 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
        /home/marxin/Programming/gcc/gcc/tree.cc:11199
0x1b9278f walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
        /home/marxin/Programming/gcc/gcc/tree.cc:11334
0x1b9278f walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
        /home/marxin/Programming/gcc/gcc/tree.cc:11334
0xbc73f9 cp_fold_function(tree_node*)
        /home/marxin/Programming/gcc/gcc/cp/cp-gimplify.cc:1114
0xc42ff8 finish_function(bool)
        /home/marxin/Programming/gcc/gcc/cp/decl.cc:17967
0xda2a1f cp_parser_function_definition_after_declarator
        /home/marxin/Programming/gcc/gcc/cp/parser.cc:31331
0xda283b cp_parser_function_definition_from_specifiers_and_declarator
        /home/marxin/Programming/gcc/gcc/cp/parser.cc:31244
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

             reply	other threads:[~2022-05-09  7:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09  7:47 marxin at gcc dot gnu.org [this message]
2022-05-09  7:47 ` [Bug c++/105529] " marxin at gcc dot gnu.org
2022-05-09  8:15 ` [Bug c++/105529] [13 Regression] cxx_eval_store_expression on arm because of ctor returning this " rguenth at gcc dot gnu.org
2022-05-09  8:48 ` dcb314 at hotmail dot com
2022-05-09 16:31 ` mpolacek at gcc dot gnu.org
2022-05-09 17:11 ` mpolacek at gcc dot gnu.org
2022-05-10  5:06 ` cvs-commit at gcc dot gnu.org
2022-05-10  5:06 ` jason 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-105529-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).