public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107079] New: ICE initializing lifetime-extended constexpr variable that stores its this pointer
@ 2022-09-28 21:58 johelegp at gmail dot com
  2022-09-29 14:26 ` [Bug c++/107079] [10/11/12/13 Regression] " mpolacek at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: johelegp at gmail dot com @ 2022-09-28 21:58 UTC (permalink / raw)
  To: gcc-bugs

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
```

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

end of thread, other threads:[~2023-06-30 13:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 21:58 [Bug c++/107079] New: ICE initializing lifetime-extended constexpr variable that stores its this pointer johelegp at gmail dot com
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

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