A new alpha bug
H.J. Lu
hjl@lucon.org
Tue Sep 16 10:11:00 GMT 1997
>
> >>>>> Jim Wilson <wilson@cygnus.com> writes:
>
> > The following patch will fix the problem, but I am not sure if it is the
> > right solution.
>
> I think this is better:
>
> Wed Aug 13 17:32:38 1997 Jason Merrill <jason@yorick.cygnus.com>
>
> * expr.c (expand_expr, case TARGET_EXPR): Call mark_addressable
> again for the slot after we give it RTL.
>
> Index: expr.c
> ===================================================================
> RCS file: /cvs/cvsfiles/egcs/gcc/expr.c,v
> retrieving revision 1.7
> diff -c -r1.7 expr.c
> *** expr.c 1997/09/16 02:07:20 1.7
> --- expr.c 1997/09/16 03:37:26
> ***************
> *** 6919,6924 ****
> --- 6919,6929 ----
> /* All temp slots at this level must not conflict. */
> preserve_temp_slots (target);
> DECL_RTL (slot) = target;
> + if (TREE_ADDRESSABLE (slot))
> + {
> + TREE_ADDRESSABLE (slot) = 0;
> + mark_addressable (slot);
> + }
>
> /* Since SLOT is not known to the called function
> to belong to its stack frame, we must build an explicit
>
Have you tried your patch? on a cross compiler? I need
this patch to get it to generate the right asm code with my cross
compiler. It takes hours to verify on my alpha machine.
BTW, both yours and Jim's patches sound like a kludge to me.
I don't understand why it takes TImode to expose this bug.
Is there a more subtle bug somehwhere else? Also how many
other places do we have to change to make it work right
for all cases? Is there a cleaner way to fix it?
Thanks.
--
H.J. Lu (hjl@gnu.ai.mit.edu)
----
Index: expr.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/gcc/expr.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 expr.c
--- expr.c 1997/09/11 20:47:02 1.1.1.4
+++ expr.c 1997/09/16 16:59:11
@@ -6918,6 +6920,11 @@
/* All temp slots at this level must not conflict. */
preserve_temp_slots (target);
DECL_RTL (slot) = target;
+ if (TREE_ADDRESSABLE (slot))
+ {
+ TREE_ADDRESSABLE (slot) = 0;
+ mark_addressable (slot);
+ }
/* Since SLOT is not known to the called function
to belong to its stack frame, we must build an explicit
@@ -6951,6 +6958,11 @@
}
DECL_RTL (slot) = target;
+ if (TREE_ADDRESSABLE (slot))
+ {
+ TREE_ADDRESSABLE (slot) = 0;
+ mark_addressable (slot);
+ }
}
exp1 = TREE_OPERAND (exp, 3) = TREE_OPERAND (exp, 1);
More information about the Gcc
mailing list