[PATCH] PR 18164, ICE with inline-asm and empty constraint

Andrew Pinski pinskia@physics.uc.edu
Thu Nov 25 19:35:00 GMT 2004


The problem here is that we were trying to construct a string with a
length of -1 which is wrong.  The way I fixed this problem is by not
processing empty strings in gimplify_asm_expr at all.

The double error message about "output operand constraint lacks '='"
is also fixed.

OK? Bootstrapped and tested on powerpc-darwin.

Thanks,
Andrew Pinski

ChangeLog:

	* gimplify.c (gimplify_asm_expr): If the length of an output operand
	is zero, do not process it, just let it go through.

Testcase:
/* { dg-do compile } */
void
f (void)
{
   int x;
   asm ("" :  "" (x)); /* {dg-error "output operand constraint lacks" } 
*/
}

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: temp.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041125/14894a07/attachment.txt>


More information about the Gcc-patches mailing list