X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=libmudflap%2Ftestsuite%2Flibmudflap.c%2Fpass46-frag.c;fp=libmudflap%2Ftestsuite%2Flibmudflap.c%2Fpass46-frag.c;h=2f327891bc03c606adb710de123aa6f21ef19c1a;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=0000000000000000000000000000000000000000;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/libmudflap/testsuite/libmudflap.c/pass46-frag.c b/libmudflap/testsuite/libmudflap.c/pass46-frag.c new file mode 100644 index 00000000..2f327891 --- /dev/null +++ b/libmudflap/testsuite/libmudflap.c/pass46-frag.c @@ -0,0 +1,18 @@ +#include +#include +#include + +int foo (int *u, int i) +{ + return u[i]; /* this dereference should not be instrumented */ +} + +int main () +{ + int *k = malloc (6); + int l = foo (k, 8); + int boo [8]; + int m = boo [l % 2 + 12]; /* should not be instrumented */ + return m & strlen (""); /* a fancy way of saying "0" */ +} +/* { dg-options "-fmudflap -fmudflapir -lmudflap -Wall" } */