diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-30 08:18:51 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-30 08:18:51 +0000 |
commit | 663870fcfbd8a82aa73cb4d24002416b3c3920df (patch) | |
tree | c6ff670cbfdd68868a66b9b4e1ca2e9bd5e76882 /gcc/builtins.c | |
parent | 1c4a12a350728806894fa70b0bc6c11ef73e01c0 (diff) | |
download | gcc-663870fcfbd8a82aa73cb4d24002416b3c3920df.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158923 138bc75d-0d04-0410-961f-82ee72b054a4
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 997c13a5505..b514ae03b41 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; } |