From 79fbdeb87e6e91a8179465ea56007e493c7ca751 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 26 Jan 2018 12:47:11 +0100 Subject: re PR c/83989 (-Wrestrict false positive with malloc-style functions) PR c/83989 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR. * c-c++-common/Wrestrict-3.c: New test. From-SVN: r257086 --- gcc/gimple-ssa-warn-restrict.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'gcc/gimple-ssa-warn-restrict.c') diff --git a/gcc/gimple-ssa-warn-restrict.c b/gcc/gimple-ssa-warn-restrict.c index d3e4e52..5b3b969 100644 --- a/gcc/gimple-ssa-warn-restrict.c +++ b/gcc/gimple-ssa-warn-restrict.c @@ -373,9 +373,6 @@ builtin_memref::builtin_memref (tree expr, tree size) offrange[1] += off; } } - - if (TREE_CODE (base) == SSA_NAME && SSA_NAME_VAR (base)) - base = SSA_NAME_VAR (base); } if (size) -- cgit v1.1