https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103099
Bug ID: 103099
Summary: [12 Regression] ICE tree check: expected ssa_name,
have debug_expr_decl in split_function, at
ipa-split.c:1397 since r12-4920-g1ece90ffa9ce63b4
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: jamborm at gcc dot gnu.org, marxin at gcc dot gnu.org
Target Milestone: ---
The following was isolated from Godot game engine:
$ cat canvas.ii
void pthread_mutex_unlock(int *);
int __gthread_mutex_unlock___mutex, unlock___trans_tmp_1;
struct Object {
void _change_notify() {}
bool _is_queued_for_deletion;
};
struct ClassDB {
template <class N, class M> static int bind_method(N, M);
};
struct CanvasItemMaterial : Object {
bool particles_animation;
void set_particles_animation(bool);
};
void CanvasItemMaterial::set_particles_animation(bool p_particles_anim) {
particles_animation = p_particles_anim;
if (unlock___trans_tmp_1)
pthread_mutex_unlock(&__gthread_mutex_unlock___mutex);
_change_notify();
}
void CanvasItemMaterial_bind_methods() {
ClassDB::bind_method("", &CanvasItemMaterial::set_particles_animation);
}
$ g++ canvas.ii -O2 -g
during GIMPLE pass: fnsplit
canvas.ii: In member function ‘void
CanvasItemMaterial::set_particles_animation(bool)’:
canvas.ii:22:1: internal compiler error: tree check: expected ssa_name, have
debug_expr_decl in split_function, at ipa-split.c:1397
22 | }
| ^
0x8cfd28 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
/home/marxin/Programming/gcc/gcc/tree.c:8689
0x978716 tree_check(tree_node*, char const*, int, char const*, tree_code)
/home/marxin/Programming/gcc/gcc/tree.h:3433
0x978716 split_function
/home/marxin/Programming/gcc/gcc/ipa-split.c:1397
0x1f2613b execute_split_functions
/home/marxin/Programming/gcc/gcc/ipa-split.c:1867
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.