]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2007-03-13 Seongbae Park <seongbae.park@gmail.com>
authorspark <spark@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Mar 2007 05:48:35 +0000 (05:48 +0000)
committerspark <spark@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Mar 2007 05:48:35 +0000 (05:48 +0000)
PR tree-optimization/30590
* tree-nrv.c (tree_nrv): Check for the partial update of the
return value.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122909 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-nrv.c

index 45d009db9e5bad9164a46e3067b718e6ba9397a8..1e5a199e17836f29b11546ae97b1c03ea9873359 100644 (file)
@@ -1,3 +1,9 @@
+2007-03-13  Seongbae Park <seongbae.park@gmail.com>
+
+       PR tree-optimization/30590
+       * tree-nrv.c (tree_nrv): Check for the partial update of the
+       return value.
+
 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
 
        * flags.h (flag_random_seed): Remove declaration, in favor of...
index c33ff0ea31aba54b5aaaa3e0252384e2920e7682..906b98fbc8ad639aac816a2d5cf1dbd357445b06 100644 (file)
@@ -163,6 +163,14 @@ tree_nrv (void)
                                                     result_type))
                return 0;
            }
+         else if (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT)
+           {
+             tree addr = get_base_address (GIMPLE_STMT_OPERAND (stmt, 0));
+              /* If there's any MODIFY of component of RESULT, 
+                 then bail out.  */
+             if (addr && addr == result)
+               return 0;
+           }
        }
     }