https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104583
Bug ID: 104583
Summary: [12 regression] ICE dolphin-emu at
cp/cp-gimplify.cc:746
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: slyfox at gcc dot gnu.org
Target Milestone: ---
Noticed ICE today when was building dolpjin-emu with a weekly gcc snapshot and
current gcc master.
Minimal reproducer:
// $ cat bug.cc
struct TVec3 {
TVec3();
int data;
};
using Vec3 = TVec3;
struct {
Vec3 position{};
} EmulatePoint_state;
void EmulatePoint() { EmulatePoint_state = {}; }
/tmp/gcc/xg++ -B/tmp/gcc -c bug.cc -freport-bug
bug.cc: In function ‘void EmulatePoint()’:
bug.cc:9:42: internal compiler error: in cp_gimplify_expr, at
cp/cp-gimplify.cc:746
9 | void EmulatePoint() { EmulatePoint_state = {}; }
| ~~~~~~~~~~~~~~~~~~~^~~~
0x7a0fb2 cp_gimplify_expr(tree_node**, gimple**, gimple**)
/home/slyfox/dev/git/gcc/gcc/cp/cp-gimplify.cc:746
0xd9fb80 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/slyfox/dev/git/gcc/gcc/gimplify.cc:14893
0xdab095 gimplify_init_ctor_preeval
/home/slyfox/dev/git/gcc/gcc/gimplify.cc:4678
0xdab19d gimplify_init_ctor_preeval
/home/slyfox/dev/git/gcc/gcc/gimplify.cc:4664
0xdac73d gimplify_init_constructor
/home/slyfox/dev/git/gcc/gcc/gimplify.cc:5243
0xdacf76 gimplify_modify_expr_rhs
/home/slyfox/dev/git/gcc/gcc/gimplify.cc:5560
0xdad79f gimplify_modify_expr
/home/slyfox/dev/git/gcc/gcc/gimplify.cc:5926
0xd9b0b1 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/slyfox/dev/git/gcc/gcc/gimplify.cc:14984
0xda029d gimplify_stmt(tree_node**, gimple**)
/home/slyfox/dev/git/gcc/gcc/gimplify.cc:7039
0xda18fc gimplify_cleanup_point_expr
/home/slyfox/dev/git/gcc/gcc/gimplify.cc:6778
0xd9c491 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/slyfox/dev/git/gcc/gcc/gimplify.cc:15377
0xda029d gimplify_stmt(tree_node**, gimple**)
/home/slyfox/dev/git/gcc/gcc/gimplify.cc:7039
0xda1e49 gimplify_body(tree_node*, bool)
/home/slyfox/dev/git/gcc/gcc/gimplify.cc:16230
0xda2365 gimplify_function_tree(tree_node*)
/home/slyfox/dev/git/gcc/gcc/gimplify.cc:16384
0xbaceda cgraph_node::analyze()
/home/slyfox/dev/git/gcc/gcc/cgraphunit.cc:675
0xbaf6a5 analyze_functions
/home/slyfox/dev/git/gcc/gcc/cgraphunit.cc:1240
0xbb0795 symbol_table::finalize_compilation_unit()
/home/slyfox/dev/git/gcc/gcc/cgraphunit.cc:2500
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Preprocessed source stored into /tmp/ccpGKHxu.out file, please attach this to
your bugreport.
$ /tmp/gcc/xg++ -B/tmp/gcc -v
Reading specs from /tmp/gcc/specs
COLLECT_GCC=/tmp/gcc/xg++
COLLECT_LTO_WRAPPER=/tmp/gcc/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib
--disable-bootstrap
--with-native-system-header-dir=/nix/store/vccvfa5bjb9dv4x6zq5gjf1yp58y4brg-glibc-2.33-108-dev/include
--prefix=/tmp/__td__ CFLAGS='-O1 -ggdb3' CXXFLAGS='-O1 -ggdb3' LDFLAGS='-O1
-ggdb3'
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.1 20220217 (experimental) (GCC)