aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-ssa-warn-restrict.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-01-26 12:47:11 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-01-26 12:47:11 +0100
commit79fbdeb87e6e91a8179465ea56007e493c7ca751 (patch)
treeab9e2475b075b18581d93fb911addc7b3ac4712b /gcc/gimple-ssa-warn-restrict.c
parent62f2664539efdced7387a13c2e9a6465f5867c0f (diff)
downloadgcc-79fbdeb87e6e91a8179465ea56007e493c7ca751.zip
gcc-79fbdeb87e6e91a8179465ea56007e493c7ca751.tar.gz
gcc-79fbdeb87e6e91a8179465ea56007e493c7ca751.tar.bz2
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
Diffstat (limited to 'gcc/gimple-ssa-warn-restrict.c')
-rw-r--r--gcc/gimple-ssa-warn-restrict.c3
1 files changed, 0 insertions, 3 deletions
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)