diff options
author | Richard Guenther <rguenther@suse.de> | 2010-04-30 08:18:51 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-04-30 08:18:51 +0000 |
commit | 0646825443aef1495f97f719f91fdc7a5c1e26f8 (patch) | |
tree | c6ff670cbfdd68868a66b9b4e1ca2e9bd5e76882 /gcc/builtins.c | |
parent | 8cdea6ab132a3624569e3dd32eabff4d84fb5a25 (diff) | |
download | gcc-0646825443aef1495f97f719f91fdc7a5c1e26f8.zip gcc-0646825443aef1495f97f719f91fdc7a5c1e26f8.tar.gz gcc-0646825443aef1495f97f719f91fdc7a5c1e26f8.tar.bz2 |
builtins.c (fold_builtin_1): Delete free (0).
2010-04-30 Richard Guenther <rguenther@suse.de>
* builtins.c (fold_builtin_1): Delete free (0).
* gcc.dg/tree-ssa/builtin-free.c: New testcase.
From-SVN: r158923
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 997c13a..b514ae0 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -9817,7 +9817,6 @@ fold_builtin_1 (location_t loc, tree fndecl, tree arg0, bool ignore) enum built_in_function fcode = DECL_FUNCTION_CODE (fndecl); switch (fcode) { - case BUILT_IN_CONSTANT_P: { tree val = fold_builtin_constant_p (arg0); @@ -10199,6 +10198,11 @@ fold_builtin_1 (location_t loc, tree fndecl, tree arg0, bool ignore) case BUILT_IN_VPRINTF: return fold_builtin_printf (loc, fndecl, arg0, NULL_TREE, ignore, fcode); + case BUILT_IN_FREE: + if (integer_zerop (arg0)) + return build_empty_stmt (loc); + break; + default: break; } |