This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3.0] fix c/4299
On Thu, Dec 13, 2001 at 11:55:54PM +0100, Franz Sirl wrote:
> test.c:15: output number 0 not directly addressable
> test.c:15: inconsistent operand constraints in an `asm'
Grr. This test predates my patch, but it's definitely wrong.
r~
* stmt.c (expand_asm_operands): Correct and simplify the
conditions for spilling an output operand to memory.
Index: stmt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/stmt.c,v
retrieving revision 1.184.2.9
diff -c -p -d -r1.184.2.9 stmt.c
*** stmt.c 2001/12/07 00:21:29 1.184.2.9
--- stmt.c 2001/12/14 00:25:22
*************** expand_asm_operands (string, outputs, in
*** 1713,1724 ****
return;
if (! allows_reg
! && ((TREE_CODE (val) == INDIRECT_REF && allows_mem)
|| (DECL_P (val)
! && (allows_mem || GET_CODE (DECL_RTL (val)) == REG)
! && ! (GET_CODE (DECL_RTL (val)) == REG
! && GET_MODE (DECL_RTL (val)) != TYPE_MODE (type)))
! || is_inout))
mark_addressable (val);
if (is_inout)
--- 1713,1723 ----
return;
if (! allows_reg
! && (allows_mem
! || is_inout
|| (DECL_P (val)
! && GET_CODE (DECL_RTL (val)) == REG
! && GET_MODE (DECL_RTL (val)) != TYPE_MODE (type))))
mark_addressable (val);
if (is_inout)