https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82879
Bug ID: 82879
Summary: [8 regression] ICE in max, at profile-count.h:889
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: trippels at gcc dot gnu.org
CC: hubicka at ucw dot cz, marxin at gcc dot gnu.org
Target Milestone: ---
trippels@gcc2-power8 ffmpeg % cat motionpixels.i
int a, b;
static __attribute__((cold)) void fn1() {
for (;;)
for (; a;)
;
}
void fn2() {
if (b)
fn1();
}
trippels@gcc2-power8 ffmpeg % gcc -c -O2 motionpixels.i
during IPA pass: inline
motionpixels.i: In function ‘fn2’:
motionpixels.i:7:6: internal compiler error: in max, at profile-count.h:889
void fn2() {
^~~
0x1086b0af profile_count::max(profile_count) const
../../gcc/gcc/profile-count.h:889
0x1086b0af counts_to_freqs()
../../gcc/gcc/predict.c:3327
0x10a3947b optimize_inline_calls(tree_node*)
../../gcc/gcc/tree-inline.c:5115
0x112da10f inline_transform(cgraph_node*)
../../gcc/gcc/ipa-inline-transform.c:709
0x1084bd6f execute_one_ipa_transform_pass
../../gcc/gcc/passes.c:2239
0x1084bd6f execute_all_ipa_transforms()
../../gcc/gcc/passes.c:2281
0x103ea68b cgraph_node::expand()
../../gcc/gcc/cgraphunit.c:2132
0x103ec2f3 expand_all_functions
../../gcc/gcc/cgraphunit.c:2275
0x103ec2f3 symbol_table::compile()
../../gcc/gcc/cgraphunit.c:2623
0x103ef9c7 symbol_table::compile()
../../gcc/gcc/cgraphunit.c:2682
0x103ef9c7 symbol_table::finalize_compilation_unit()
../../gcc/gcc/cgraphunit.c:2716