This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ICE in rtx_equal_for_memref_p for inline assembler


On Mon, Apr 30, 2001 at 12:52:26PM +0200, Marcus Meissner wrote:
> Hi,
> 
> I get the following ICE for alias handling of inline assembly during compiling
> WINE with the current GCC headbranch.
> 
>   gcc -c -I. -I. -I../include -I../include  -g -O2 -Wall -mpreferred-stack-boundary=2 -fPIC -D__WINE__ -DBINDIR="\"/usr/local/bin\"" -D_REENTRANT -I/usr/X11R6/include -o client.o client.c
>   fmt[i] is |s|
>   rtl for x:
>   (asm_operands:SI (".byte 0x64
> 	  movl (0x18),%0") ("=r") 0[ ]
>       [ ]  ("../include/winnt.h") 1803)
>   rtl for y:
>   (asm_operands:SI (".byte 0x64
> 	  movl (0x18),%0") ("=r") 0[ ]
>       [ ]  ("../include/winnt.h") 1803)
>   client.c: In function `CLIENT_InitThread':
>   client.c:684: Internal compiler error in rtx_equal_for_memref_p, at alias.c:1112

The following patch fixes the problem.

I just check the rtx if it is a ASM_OPERAND and return 0 in this case.

Ciao, Marcus

Changelog:
	alias.c (rtx_equal_for_memref_p) ASM_OPERANDS are never equal.

Index: alias.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/alias.c,v
retrieving revision 1.122
diff -u -r1.122 alias.c
--- alias.c	2001/04/09 14:27:00	1.122
+++ alias.c	2001/04/30 16:00:21
@@ -1017,6 +1017,10 @@
   if (code != GET_CODE (y))
     return 0;
 
+  /* We just cannot guess what assembler does */
+  if (code == ASM_OPERANDS)
+    return 0;
+
   /* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent.
      (REG:SI x) and (REG:HI x) are NOT equivalent.  */
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]