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]
Other format: [Raw text]

Re: PR inline-asm/8803


> On Tue, Apr 08, 2003 at 08:15:37PM +0200, Jan Hubicka wrote:
> > I am getting quite nervous about keeping the
> > inconsistent asm statement in the chain.  What about zapping all that
> > does not validate just after instantiate_virtual_regs?
> 
> I thought we already did that...  Certainly I think that's
> for the best.  Does that affect whether the addressof changes
> are needed?
> 
The attached patch avoids the crash as well.  I am unsure on whether it
won't match on ASM statements that previously got magically trought the
compiler but I can not think about sane use of such trick.

OK for mainline/3.3?

Thu Apr 10 23:17:30 CEST 2003  Jan Hubicka  <jh at suse dot cz>
	PR inline-asm/8803
	* function.c (instantate_virtual_regs):  Verify that all ASM statements
	match after the virutal regs instantiation.
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.415
diff -c -3 -p -r1.415 function.c
*** function.c	9 Apr 2003 06:32:21 -0000	1.415
--- function.c	10 Apr 2003 21:16:55 -0000
*************** instantiate_virtual_regs (fndecl, insns)
*** 3592,3597 ****
--- 3592,3603 ----
  	if (GET_CODE (insn) == CALL_INSN)
  	  instantiate_virtual_regs_1 (&CALL_INSN_FUNCTION_USAGE (insn),
  				      NULL_RTX, 0);
+ 
+ 	/* Past this point all ASM statements should match.  Verify that
+ 	   to avoid failures later in the compilation process.  */
+         if (asm_noperands (PATTERN (insn)) >= 0
+ 	    && insn_invalid_p (insn))
+           instantiate_virtual_regs_lossage (insn);
        }
  
    /* Instantiate the stack slots for the parm registers, for later use in


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