[Bug tree-optimization/97609] [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708

amacleod at redhat dot com gcc-bugzilla@gcc.gnu.org
Wed Oct 28 20:24:15 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97609

--- Comment #5 from Andrew Macleod <amacleod at redhat dot com> ---
Created attachment 49460
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49460&action=edit
call infer_non_null directly

Looking closer at the non-null deref calls, the problem was deep in
stmt_ends_bb_p() which cares about trapping statements and such... 

The general routine looks closely to see if the stmt is the last stmt in a
block, and we have no need to do that.

This patch is currently in testing, and simply calls infer_nonnull_range()
directly.   Probably should have been doing that from the start since thats the
actual question being asked.


More information about the Gcc-bugs mailing list