[Bug ipa/96130] [10/11 Regression] ICE in analyze_function_body at gcc/ipa-fnsummary.c:2769 since r10-3199-g351e7c3b5fbd45bd

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 10 14:13:41 GMT 2020


--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
My understanding of the problem is that set_switch_stmt_execution_predicate
figures out that the default: is unreachable (operand is a bitfield with values
0 to 7 and there are cases for all 8) and notes that into the predicate for the
switch -> default: edge's aux, and then compute_bb_predicates iterates, but as
the 3 -> 9 predicate always resolves to false, nothing adds bb_9->aux.  And
later we try to dereference that.
So, either predicates in bb->aux are optional and we should treat a missing
predicate as false predicate, or compute_bb_predicate should ensure to fill in
bb->aux even for bbs it left NULL at the end.
          if (bb->aux)
            bb_predicate = *(predicate *) bb->aux;
            bb_predicate = false;
in analyze_function_body suggests that perhaps the latter is the case.

More information about the Gcc-bugs mailing list