diff options
author | Laurynas Biveinis <laurynas.biveinis@gmail.com> | 2008-06-22 15:28:04 +0000 |
---|---|---|
committer | Laurynas Biveinis <lauras@gcc.gnu.org> | 2008-06-22 15:28:04 +0000 |
commit | 2c68ba8ee709e39df8cd03ecea9af1f463065f9e (patch) | |
tree | 6cfa632a138684ffc45a8c9b6f1b01f69fa6780b /gcc | |
parent | d75d71e0acaac3a1d67061ca26fdabd05d6a3295 (diff) | |
download | gcc-2c68ba8ee709e39df8cd03ecea9af1f463065f9e.zip gcc-2c68ba8ee709e39df8cd03ecea9af1f463065f9e.tar.gz gcc-2c68ba8ee709e39df8cd03ecea9af1f463065f9e.tar.bz2 |
re PR middle-end/34906 (valgrind error indication from testsuite gimplify.c: gimplify_asm_expr)
2008-06-22 Laurynas Biveinis <laurynas.biveinis@gmail.com>
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/gimplify.c | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7f86169..c3f003b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2008-06-22 Laurynas Biveinis <laurynas.biveinis@gmail.com> + + 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 <iant@google.com> * c-lex.c (narrowest_unsigned_type): Change itk to int. diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 47a2fe7..bf81bb0 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)); |