This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR c/8439
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 9 Nov 2002 00:47:14 +0100
- Subject: Re: [PATCH] PR c/8439
- References: <7850000.1036775092@warlock.codesourcery.com>
> That seems like a good strategy. Try it, and check it in if it passes.
Bootstrapped/regtested (c,c++,objc,f77 mainline) on i586-redhat-linux-gnu.
I don't have CVS access, so you need to check it in for me. Patch and testcase
attached.
2002-11-09 Eric Botcazou <ebotcazou@libertysurf.fr>
PR c/8439
* recog.c (validate_replace_rtx_1) [PLUS]: Simplify only
if there is something new to be simplified.
In light of this patch, the fix I proposed for PR c/7411 was only papering over
the problem and is now useless (it taught expand_expr to throw away null operands
in PLUS expressions). Do you want me to submit a patch that reverts it ?
--
Eric Botcazou
--- gcc/recog.c.orig Fri Nov 8 12:41:35 2002
+++ gcc/recog.c Fri Nov 8 13:13:22 2002
@@ -522,10 +522,10 @@
{
case PLUS:
/* If we have a PLUS whose second operand is now a CONST_INT, use
- plus_constant to try to simplify it.
+ simplify_gen_binary to try to simplify it.
??? We may want later to remove this, once simplification is
separated from this function. */
- if (GET_CODE (XEXP (x, 1)) == CONST_INT)
+ if (GET_CODE (XEXP (x, 1)) == CONST_INT && XEXP (x, 1) == to)
validate_change (object, loc,
simplify_gen_binary
(PLUS, GET_MODE (x), XEXP (x, 0), XEXP (x, 1)), 1);
/* PR c/8439 */
/* Verify that GCC properly handles null increments. */
struct empty {
};
void foo(struct empty *p)
{
p++;
}