public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "johelegp at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/107079] New: ICE initializing lifetime-extended constexpr variable that stores its this pointer
Date: Wed, 28 Sep 2022 21:58:23 +0000	[thread overview]
Message-ID: <bug-107079-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 107079
           Summary: ICE initializing lifetime-extended constexpr variable
                    that stores its this pointer
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: johelegp at gmail dot com
                CC: johelegp at gmail dot com
  Target Milestone: ---

See https://godbolt.org/z/5asqcnoMe.

```C++
struct X {
  const X* x = this;
};
constexpr const X& x = X{};
```

```
<source>:4:26: internal compiler error: in cxx_eval_constant_expression, at
cp/constexpr.cc:7591
    4 | constexpr const X& x = X{};
      |                          ^
0x23507de internal_error(char const*, ...)
        ???:0
0xa9ea08 fancy_abort(char const*, int, char const*)
        ???:0
0xd4f2da store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ???:0
0xb78f38 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ???:0
0xc786f7 c_parse_file()
        ???:0
0xdb4a19 c_common_parse_file()
        ???:0
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.
Compiler returned: 1
```

             reply	other threads:[~2022-09-28 21:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28 21:58 johelegp at gmail dot com [this message]
2022-09-29 14:26 ` [Bug c++/107079] [10/11/12/13 Regression] " mpolacek at gcc dot gnu.org
2023-02-03 20:59 ` mpolacek at gcc dot gnu.org
2023-02-03 23:32 ` mpolacek at gcc dot gnu.org
2023-02-07 21:01 ` mpolacek at gcc dot gnu.org
2023-02-08 19:01 ` mpolacek at gcc dot gnu.org
2023-02-10  0:06 ` cvs-commit at gcc dot gnu.org
2023-02-10  0:07 ` [Bug c++/107079] [10/11/12 " mpolacek at gcc dot gnu.org
2023-03-07 16:24 ` cvs-commit at gcc dot gnu.org
2023-03-07 16:25 ` [Bug c++/107079] [10/11 " mpolacek at gcc dot gnu.org
2023-06-30 13:58 ` ppalka 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-107079-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).