]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/34906 (valgrind error indication from testsuite gimplify.c: gimplify...
authorLaurynas Biveinis <laurynas.biveinis@gmail.com>
Sun, 22 Jun 2008 15:28:04 +0000 (15:28 +0000)
committerLaurynas Biveinis <lauras@gcc.gnu.org>
Sun, 22 Jun 2008 15:28:04 +0000 (15:28 +0000)
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

gcc/ChangeLog
gcc/gimplify.c

index 7f86169333207954358222a8c1e47750fabcb6fa..c3f003bf47d542c6685125db1eaeb27af91e3491 100644 (file)
@@ -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.
index 47a2fe7b43dfe6a94e0c3fb4d56e3d893a1af4a8..bf81bb0c09a0d494d7ff36e6d8ffe6221fb4b41c 100644 (file)
@@ -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));