public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114913] New: "verify_gimple failed" due to addition of two constexpr strings
@ 2024-05-01 21:02 jorg.brown at gmail dot com
  2024-05-01 21:11 ` [Bug middle-end/114913] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jorg.brown at gmail dot com @ 2024-05-01 21:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114913
           Summary: "verify_gimple failed" due to addition of two
                    constexpr strings
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jorg.brown at gmail dot com
  Target Milestone: ---

Source:

#include <string>

constexpr std::string Hello = "Hello, ", World = "World.";
constexpr std::string HelloWorld = Hello + World;

int main() { printf("%s\n", HelloWorld.c_str()); }

= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =

Version:

g++
(Compiler-Explorer-Build-gcc-610415bb7ddc5626ec301ca20833e78696978601-binutils-2.40)
15.0.0 20240501 (experimental)
Copyright (C) 2024 Free Software Foundation, Inc.

ASM generation compiler returned: 0
g++
(Compiler-Explorer-Build-gcc-610415bb7ddc5626ec301ca20833e78696978601-binutils-2.40)
15.0.0 20240501 (experimental)
Copyright (C) 2024 Free Software Foundation, Inc.

= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =

As seen at https://godbolt.org/z/hd1TbM61Y , I got:

<source>: In function 'int main()':
<source>:8:50: error: constant not recomputed when 'ADDR_EXPR' changed
    8 | int main() { printf("%s\n", HelloWorld.c_str()); }
      |                                                  ^
_3 = &HelloWorld.D.38876._M_local_buf;
during GIMPLE pass: einline
<source>:8:50: internal compiler error: verify_gimple failed
0x267adac internal_error(char const*, ...)
        ???:0
0x13e317e verify_gimple_in_cfg(function*, bool, bool)
        ???: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

= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =

I don't have access to the gcc executable causing this problem, and
-freport-bug doesn't work from godbolt, so I can't give you the preprocessed
input.

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

end of thread, other threads:[~2024-05-02 15:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-01 21:02 [Bug c++/114913] New: "verify_gimple failed" due to addition of two constexpr strings jorg.brown at gmail dot com
2024-05-01 21:11 ` [Bug middle-end/114913] " pinskia at gcc dot gnu.org
2024-05-01 21:18 ` mpolacek at gcc dot gnu.org
2024-05-01 22:24 ` pinskia at gcc dot gnu.org
2024-05-01 22:29 ` pinskia at gcc dot gnu.org
2024-05-01 22:55 ` jorg.brown at gmail dot com
2024-05-01 23:00 ` pinskia at gcc dot gnu.org
2024-05-02 11:28 ` [Bug c++/114913] " rguenth at gcc dot gnu.org
2024-05-02 14:13 ` ppalka at gcc dot gnu.org
2024-05-02 15:21 ` 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).