https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70876
Bug ID: 70876 Summary: ICE in chkp_find_bounds: Unexpected tree code with_size_expr Product: gcc Version: 6.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com Target Milestone: --- /* gcc -fcheck-pointer-bounds -mmpx */ void f (char *s1, char *s2) { int z = 5; struct { char a[z]; } x; s1[0] = s2[0]; foo (x, x); } /*p.c: In function ‘f’: * p.c:10:3: warning: implicit declaration of function ‘foo’ [-Wimplicit-function-declaration] * foo (x, x); * ^~~ * p.c: In function ‘f.chkp’: * p.c:11:1: internal compiler error: chkp_find_bounds: Unexpected tree code with_size_expr * } * ^ * 0xa4de44 chkp_find_bounds_1 *../../gcc-6.1.0/gcc/tree-chkp.c:3667 * 0xa51f78 chkp_find_bounds * ../../gcc-6.1.0/gcc/tree-chkp.c:3687 * 0xa51f78 chkp_add_bounds_to_call_stmt * ../../gcc-6.1.0/gcc/tree-chkp.c:1896 * 0xa51f78 chkp_instrument_function * ../../gcc-6.1.0/gcc/tree-chkp.c:4271 * 0xa51f78 chkp_execute * ../../gcc-6.1.0/gcc/tree-chkp.c:4455 * 0xa51f78 execute * ../../gcc-6.1.0/gcc/tree-chkp.c:4514 * Please submit a full bug report, * with preprocessed source if appropriate. * Please include the complete backtrace with any bug report. * See <http://gcc.gnu.org/bugs.html> for instructions. */