[PATCH] sanitizer: do not ICE for pointer cmp/sub

2020-12-10 Thread Martin Liška
Hello. In C FE we have troubles to instrument top-level pointer comparison (and subtraction): /home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/asan/pr98204.c:5:1: internal compiler error: in pointer_diff, at c/c-typeck.c:3954 5 | static long i=((char*)&(v.c)-(char*)&v); | ^

Re: [PATCH] sanitizer: do not ICE for pointer cmp/sub

2020-12-13 Thread Jeff Law via Gcc-patches
On 12/10/20 1:31 AM, Martin LiÅ¡ka wrote: > Hello. > > In C FE we have troubles to instrument top-level pointer comparison > (and subtraction): > > /home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/asan/pr98204.c:5:1: > internal compiler error: in pointer_diff, at c/c-typeck.c:3954 >   Â