2000-08-22 Richard Henderson <rth@cygnus.com>
* alias.c (init_alias_analysis): Do not register
struct_value_incoming_rtx or static_chain_rtx as pointing
to stack memory.
*** gcc/alias.c 2000/08/18 02:41:58 1.93
--- gcc/alias.c 2000/08/22 08:41:32
*************** init_alias_analysis ()
*** 1983,1997 ****
new_reg_base_value[HARD_FRAME_POINTER_REGNUM]
= gen_rtx_ADDRESS (Pmode, hard_frame_pointer_rtx);
#endif
- if (struct_value_incoming_rtx
- && GET_CODE (struct_value_incoming_rtx) == REG)
- new_reg_base_value[REGNO (struct_value_incoming_rtx)]
- = gen_rtx_ADDRESS (Pmode, struct_value_incoming_rtx);
-
- if (static_chain_rtx
- && GET_CODE (static_chain_rtx) == REG)
- new_reg_base_value[REGNO (static_chain_rtx)]
- = gen_rtx_ADDRESS (Pmode, static_chain_rtx);
/* Walk the insns adding values to the new_reg_base_value array. */
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
--- 1983,1988 ----
*** gcc/testsuite/gcc.c-torture/execute/20000822-1.c Wed Aug 23 14:17:08 2000
--- gcc/testsuite/gcc.c-torture/execute/20000822-1.c Wed Aug 23 14:04:57 2000
***************
*** 0 ****
--- 1,24 ----
+ int f0(int (*fn)(int *), int *p)
+ {
+ return (*fn) (p);
+ }
+
+ int f1(void)
+ {
+ int i = 0;
+
+ int f2(int *p)
+ {
+ i = 1;
+ return *p + 1;
+ }
+
+ return f0(f2, &i);
+ }
+
+ int main()
+ {
+ if (f1() != 2)
+ abort ();
+ return 0;
+ }