https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68270
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-03-03 CC| |marxin at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> --- The issue is not solved, let's consider: $ cat /tmp/chkp.ii typedef struct a *b; struct a { struct { int e[1]; } f; }; int g(b ptr) { return ptr->f.e[1]; } $ ./xgcc -B. /tmp/chkp.ii -Werror -c -mmpx -fcheck-pointer-bounds -O1 -Wall -fchkp-flexible-struct-trailing-arrays /tmp/chkp.ii: In function ‘int g.chkp(b, \xe2\x80\x98pointer_bounds_typ\xe2\x80\x99 not supported by dump_type#<type error>, void, ...)’: /tmp/chkp.ii:9:20: error: memory access check always fail [-Werror=chkp] return ptr->f.e[1]; ^ cc1plus: all warnings being treated as errors It's wrong and reason is explained in Richi's email: https://gcc.gnu.org/ml/gcc-patches/2017-01/msg00172.html I'm testing the patch.