Commit 6687b740 by Eric Botcazou

* gimplify.c (mostly_copy_tree_r): Deal with BIND_EXPR.

From-SVN: r161774
parent 21ffc3f7
2010-07-02 Jan Hubicka <jh@suse.cz> 2010-07-03 Eric Botcazou <ebotcazou@adacore.com>
* gimplify.c (mostly_copy_tree_r): Deal with BIND_EXPR.
2010-07-03 Jan Hubicka <jh@suse.cz>
* config/i386/i386.c (override_options): Revert accidental commit. * config/i386/i386.c (override_options): Revert accidental commit.
......
...@@ -868,9 +868,9 @@ mostly_copy_tree_r (tree *tp, int *walk_subtrees, void *data) ...@@ -868,9 +868,9 @@ mostly_copy_tree_r (tree *tp, int *walk_subtrees, void *data)
tree t = *tp; tree t = *tp;
enum tree_code code = TREE_CODE (t); enum tree_code code = TREE_CODE (t);
/* Do not copy SAVE_EXPR or TARGET_EXPR nodes themselves, but copy /* Do not copy SAVE_EXPR, TARGET_EXPR or BIND_EXPR nodes themselves, but
their subtrees if we can make sure to do it only once. */ copy their subtrees if we can make sure to do it only once. */
if (code == SAVE_EXPR || code == TARGET_EXPR) if (code == SAVE_EXPR || code == TARGET_EXPR || code == BIND_EXPR)
{ {
if (data && !pointer_set_insert ((struct pointer_set_t *)data, t)) if (data && !pointer_set_insert ((struct pointer_set_t *)data, t))
; ;
...@@ -895,10 +895,7 @@ mostly_copy_tree_r (tree *tp, int *walk_subtrees, void *data) ...@@ -895,10 +895,7 @@ mostly_copy_tree_r (tree *tp, int *walk_subtrees, void *data)
/* Leave the bulk of the work to copy_tree_r itself. */ /* Leave the bulk of the work to copy_tree_r itself. */
else else
{ copy_tree_r (tp, walk_subtrees, NULL);
gcc_assert (code != BIND_EXPR);
copy_tree_r (tp, walk_subtrees, NULL);
}
return NULL_TREE; return NULL_TREE;
} }
......
2010-07-03 Eric Botcazou <ebotcazou@adacore.com> 2010-07-03 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/cond_expr1.adb: New test.
2010-07-03 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/modular3.adb: New test. * gnat.dg/modular3.adb: New test.
* gnat.dg/modular3_pkg.ads: New helper. * gnat.dg/modular3_pkg.ads: New helper.
......
-- { dg-do compile }
-- { dg-options "-gnat12" }
function Cond_Expr1 (Dir : in String) return String is
begin
return (if Dir (Dir'Last) = '\' then Dir else Dir & '\');
end;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment