https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114854
Bug ID: 114854
Summary: [14 Regression] ICE with default initializer of const
reference member at cp/cp-gimplify.cc:900
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dani at danielbertalan dot dev
Target Milestone: ---
Compiling the following code results in an internal compiler error when using
GCC 14 trunk (gcc-14-10094-g0c8e99e5c32). GCC 13.2 is fine with it.
class Vector {
long m_size;
};
struct ProcessSpawnOptions {
Vector const &file_actions {};
};
void spawn(ProcessSpawnOptions);
void test() { spawn({}); }
<source>: In function 'void test()':
<source>:9:20: internal compiler error: in cp_gimplify_expr, at
cp/cp-gimplify.cc:900
9 | void test() { spawn({}); }
| ~~~~~^~~~
Godbolt: https://ice.godbolt.org/z/zP3K37476