From 90363d185752e6f509ea441173d2052d3f59f263 Mon Sep 17 00:00:00 2001 From: rth Date: Tue, 2 Aug 2005 20:39:24 +0000 Subject: [PATCH] PR 23196 * explow.c (memory_address): Remove special-case for virtual_stack_vars_rtx and virtual_incoming_args_rtx. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102668 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/explow.c | 12 +++--------- gcc/testsuite/gcc.c-torture/compile/20050802-1.c | 10 ++++++++++ 3 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/20050802-1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a323b8f..cf11cc3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-08-02 Richard Henderson + + PR 23196 + * explow.c (memory_address): Remove special-case for + virtual_stack_vars_rtx and virtual_incoming_args_rtx. + 2005-08-02 Diego Novillo PR 23164 diff --git a/gcc/explow.c b/gcc/explow.c index 23b124f..eea0e56 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -477,16 +477,10 @@ memory_address (enum machine_mode mode, rtx x) win2: x = oldx; win: - if (flag_force_addr && ! cse_not_expected && !REG_P (x) - /* Don't copy an addr via a reg if it is one of our stack slots. */ - && ! (GET_CODE (x) == PLUS - && (XEXP (x, 0) == virtual_stack_vars_rtx - || XEXP (x, 0) == virtual_incoming_args_rtx))) + if (flag_force_addr && ! cse_not_expected && !REG_P (x)) { - if (general_operand (x, Pmode)) - x = force_reg (Pmode, x); - else - x = force_operand (x, NULL_RTX); + x = force_operand (x, NULL_RTX); + x = force_reg (Pmode, x); } } diff --git a/gcc/testsuite/gcc.c-torture/compile/20050802-1.c b/gcc/testsuite/gcc.c-torture/compile/20050802-1.c new file mode 100644 index 0000000..abd0b51 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20050802-1.c @@ -0,0 +1,10 @@ +/* PR 23196 */ +/* { dg-options "-fforce-addr" } */ + +void foo() +{ + char c; + + c |= 1; + bar(&c); +} -- 2.7.4