This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Minor adjustment to gimplify_addr_expr
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 16 Oct 2015 12:53:16 +0200
- Subject: Re: [patch] Minor adjustment to gimplify_addr_expr
- Authentication-results: sourceware.org; auth=none
- References: <16609465 dot DasV8VXWIg at polaris> <2127196 dot Vk4gmQBscR at polaris> <CAFiYyc2wk4m1PO1sChxHTiJaP2DdK1RDU+mF5aUMfsFvR88ohg at mail dot gmail dot com>
> Sure, if that works it's pre-approved. Your original patch is also ok
> (though I still
> think it's incomplete - but we'll wait until a testcase comes up with
> the assert).
It passed a bootstrap/regtest cycle on x86-64/Linux so I have installed it.
2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
* tree.c (recompute_tree_invariant_for_addr_expr): Assert that the
argument is an ADDR_EXPR.
--
Eric Botcazou
Index: tree.c
===================================================================
--- tree.c (revision 228794)
+++ tree.c (working copy)
@@ -4248,6 +4248,8 @@ recompute_tree_invariant_for_addr_expr (
tree node;
bool tc = true, se = false;
+ gcc_assert (TREE_CODE (t) == ADDR_EXPR);
+
/* We started out assuming this address is both invariant and constant, but
does not have side effects. Now go down any handled components and see if
any of them involve offsets that are either non-constant or non-invariant.