https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83556
Bug ID: 83556
Summary: ICE in gimplify_expr, at gimplify.c:12004
Product: gcc
Version: 7.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: p.pettinato+gcc at gmail dot com
Target Milestone: ---
Compiling the following on gcc 7.2.0 (Ubuntu Artful, x86_64-linux-gnu) fails:
int func()
{
return 1;
}
struct Data
{
int good = func();
int bad = 1;
int ugly = good ? 1 * bad : 2 * bad;
};
struct MoreData
{
Data d{};
};
int main()
{
MoreData m{};
return m.d.ugly;
}
Output:
$ g++ test.cpp -o a
test.cpp: In function 'int main()':
test.cpp:10:37: internal compiler error: in gimplify_expr, at gimplify.c:12004
int ugly = good ? 1 * bad : 2 * bad;
^~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.