[multiple changes]

2004-11-18  Andrew Pinski  <pinskia@physics.uc.edu>

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

2004-11-28  Andrew Pinski  <pinskia@physics.uc.edu>

        * gcc.dg/pr18164.c: New test.

From-SVN: r91459
This commit is contained in:
Andrew Pinski 2004-11-29 02:21:28 +00:00 committed by Andrew Pinski
parent 47023d1a43
commit 6db081f1a8
4 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2004-11-18 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/18164
* gimplify.c (gimplify_asm_expr): If the length of an output operand
is zero, do not process it, just let it go through.
2004-11-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 2004-11-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Diego Novillo <dnovillo@redhat.com> Diego Novillo <dnovillo@redhat.com>

View File

@ -3120,8 +3120,12 @@ gimplify_asm_expr (tree *expr_p, tree *pre_p, tree *post_p)
ret = GS_ALL_DONE; ret = GS_ALL_DONE;
for (i = 0, link = ASM_OUTPUTS (expr); link; ++i, link = TREE_CHAIN (link)) for (i = 0, link = ASM_OUTPUTS (expr); link; ++i, link = TREE_CHAIN (link))
{ {
size_t constraint_len;
oconstraints[i] = constraint oconstraints[i] = constraint
= TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (link))); = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (link)));
constraint_len = strlen (constraint);
if (constraint_len == 0)
continue;
parse_output_constraint (&constraint, i, 0, 0, parse_output_constraint (&constraint, i, 0, 0,
&allows_mem, &allows_reg, &is_inout); &allows_mem, &allows_reg, &is_inout);
@ -3145,7 +3149,6 @@ gimplify_asm_expr (tree *expr_p, tree *pre_p, tree *post_p)
operands. */ operands. */
tree input; tree input;
char buf[10]; char buf[10];
size_t constraint_len = strlen (constraint);
/* Turn the in/out constraint into an output constraint. */ /* Turn the in/out constraint into an output constraint. */
char *p = xstrdup (constraint); char *p = xstrdup (constraint);

View File

@ -1,3 +1,7 @@
2004-11-28 Andrew Pinski <pinskia@physics.uc.edu>
* gcc.dg/pr18164.c: New test.
2004-11-28 Matt Kraai <kraai@alumni.cmu.edu> 2004-11-28 Matt Kraai <kraai@alumni.cmu.edu>
* gcc.dg/funroll-loops-all.c: New. * gcc.dg/funroll-loops-all.c: New.

View File

@ -0,0 +1,7 @@
/* { dg-do compile } */
void
f (void)
{
int x;
asm ("" : "" (x)); /* {dg-error "output operand constraint lacks" } */
}