Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- validation/linear/stray-phisrc.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 validation/linear/stray-phisrc.c diff --git a/validation/linear/stray-phisrc.c b/validation/linear/stray-phisrc.c new file mode 100644 index 000000000..e9f35c89c --- /dev/null +++ b/validation/linear/stray-phisrc.c @@ -0,0 +1,25 @@ +static int foo(int **g) +{ + int i = 1; + int *a[2]; + int **p; + + a[1] = &i; + if (g) + p = g; + else + p = &a[0]; + p += 1; // will point to a[1] = &i + if (!g) + **p = 0; + return i; +} + +/* + * check-name: stray phisrc + * check-command: test-linearize -Wno-decl $file + * check-known-to-fail + * + * check-output-ignore + * check-output-excludes: phisrc\\. + */ -- 2.14.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html