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]

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


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" } */
}


Attachment: temp.diff.txt
Description: Text document


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