From 2c68ba8ee709e39df8cd03ecea9af1f463065f9e Mon Sep 17 00:00:00 2001 From: Laurynas Biveinis Date: Sun, 22 Jun 2008 15:28:04 +0000 Subject: [PATCH] re PR middle-end/34906 (valgrind error indication from testsuite gimplify.c: gimplify_asm_expr) 2008-06-22 Laurynas Biveinis PR middle-end/34906 * gimplify.c (gimplify_asm_expr): Check the return code of parse_output_constraint call, set function return and is_inout value if it failed. From-SVN: r137020 --- gcc/ChangeLog | 7 +++++++ gcc/gimplify.c | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7f861693332..c3f003bf47d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2008-06-22 Laurynas Biveinis + + PR middle-end/34906 + * gimplify.c (gimplify_asm_expr): Check the return code of + parse_output_constraint call, set function return and is_inout + value if it failed. + 2008-06-22 Ian Lance Taylor * c-lex.c (narrowest_unsigned_type): Change itk to int. diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 47a2fe7b43d..bf81bb0c09a 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4308,14 +4308,20 @@ gimplify_asm_expr (tree *expr_p, tree *pre_p, tree *post_p) for (i = 0, link = ASM_OUTPUTS (expr); link; ++i, link = TREE_CHAIN (link)) { size_t constraint_len; + bool ok; oconstraints[i] = constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (link))); constraint_len = strlen (constraint); if (constraint_len == 0) continue; - parse_output_constraint (&constraint, i, 0, 0, - &allows_mem, &allows_reg, &is_inout); + ok = parse_output_constraint (&constraint, i, 0, 0, + &allows_mem, &allows_reg, &is_inout); + if (!ok) + { + ret = GS_ERROR; + is_inout = false; + } if (!allows_reg && allows_mem) mark_addressable (TREE_VALUE (link)); -- 2.30.2