This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
bug fix for expand_asm_operands
- To: gcc-patches at gcc dot gnu dot org
- Subject: bug fix for expand_asm_operands
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Thu, 2 Sep 1999 22:03:25 +0100 (BST)
- Cc: amylaar at cygnus dot co dot uk
Just found that input operands made from inout operands can get the wrong
mode - that showed as a segfault when doing debugging dumps for a
(rather large and confidential) testcase.
Thu Sep 2 22:00:08 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* stmt.c (expand_asm_operands): Fix index into inout_mode when
reading it.
Index: stmt.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/stmt.c,v
retrieving revision 1.159.2.2
diff -p -r1.159.2.2 stmt.c
*** stmt.c 1999/02/25 19:00:35 1.159.2.2
--- stmt.c 1999/09/02 20:59:59
*************** expand_asm_operands (string, outputs, in
*** 1524,1530 ****
XVECEXP (body, 3, ninputs - ninout + i) /* argvec */
= output_rtx[j];
XVECEXP (body, 4, ninputs - ninout + i) /* constraints */
! = gen_rtx_ASM_INPUT (inout_mode[j], match[j]);
}
/* Now, for each output, construct an rtx
--- 1524,1530 ----
XVECEXP (body, 3, ninputs - ninout + i) /* argvec */
= output_rtx[j];
XVECEXP (body, 4, ninputs - ninout + i) /* constraints */
! = gen_rtx_ASM_INPUT (inout_mode[i], match[j]);
}
/* Now, for each output, construct an rtx