public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115062] New: [modules] internal compiler error: in simplify_aggr_init_exp
@ 2024-05-13  6:49 boris at kolpackov dot net
  0 siblings, 0 replies; only message in thread
From: boris at kolpackov dot net @ 2024-05-13  6:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115062
           Summary: [modules] internal compiler error: in
                    simplify_aggr_init_exp
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: boris at kolpackov dot net
  Target Milestone: ---

Created attachment 58185
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58185&action=edit
Reproducer

With the attached module interface and implementation units and the following
command lines:

g++-14 -std=c++23 -fmodules-ts -fmodule-header -x c++-header
/usr/include/c++/14/ostream
g++-14 -std=c++23 -fmodules-ts -fmodule-header -x c++-header
/usr/include/c++/14/iosfwd
g++-14 -std=c++23 -fmodules-ts -fmodule-header -x c++-header
/usr/include/c++/14/string
g++-14 -std=c++23 -fmodules-ts -fmodule-header -x c++-header
/usr/include/c++/14/string_view
g++-14 -std=c++23 -fmodules-ts -fmodule-header -x c++-header
/usr/include/c++/14/stdexcept

g++-14 -std=c++23 -fmodules-ts -c -x c++ hello.mxx
g++-14 -std=c++23 -fmodules-ts -c -x c++ hello.cxx

I get:

hello.cxx: In function ‘std::string hello::format_hello(const
std::string_view&)’:
hello.cxx:18:42: internal compiler error: in simplify_aggr_init_expr, at
cp/semantics.cc:4950
   18 |     return "Hello, " + std::string (n) + "!";
      |                                          ^~~
0x7be5d3 simplify_aggr_init_expr(tree_node**)
        ../../src/gcc/cp/semantics.cc:4950
0xf51c9c cp_gimplify_expr(tree_node**, gimple**, gimple**)
        ../../src/gcc/cp/cp-gimplify.cc:620
0x14ac68d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../src/gcc/gimplify.cc:17790
0x14af706 gimplify_stmt(tree_node**, gimple**)
        ../../src/gcc/gimplify.cc:7578
0x14bd9a0 gimplify_and_add(tree_node*, gimple**)
        ../../src/gcc/gimplify.cc:515
0x14bd9a0 gimplify_return_expr
        ../../src/gcc/gimplify.cc:1910
0x14ad7bc gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../src/gcc/gimplify.cc:18146
0x14c55e3 gimplify_cleanup_point_expr
        ../../src/gcc/gimplify.cc:7578
0x14ad346 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../src/gcc/gimplify.cc:18277
0x14c4c25 gimplify_stmt(tree_node**, gimple**)
        ../../src/gcc/gimplify.cc:7578
0x14c4c25 gimplify_body(tree_node*, bool)
        ../../src/gcc/gimplify.cc:19151
0x14c5076 gimplify_function_tree(tree_node*)
        ../../src/gcc/gimplify.cc:19352
0x12d3fd7 cgraph_node::analyze()
        ../../src/gcc/cgraphunit.cc:687
0x12d6b37 analyze_functions
        ../../src/gcc/cgraphunit.cc:1251
0x12d7abd symbol_table::finalize_compilation_unit()
        ../../src/gcc/cgraphunit.cc:2560

This is with GCC 14 from Debian:

g++-14 (Debian 14-20240429-1) 14.0.1 20240429 (experimental) [gcc-14
r14-10144-g41d7a8ceaaa]

Replacing header unit imports with plain inclusion gets rid of the error,
naturally. I get the same result with c++23 and c++26.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-13  6:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-13  6:49 [Bug c++/115062] New: [modules] internal compiler error: in simplify_aggr_init_exp boris at kolpackov dot net

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