]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-ssa-operands.c (create_vop_var): Set DECL_IGNORED_P.
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 16 Apr 2014 10:50:58 +0000 (10:50 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 16 Apr 2014 10:50:58 +0000 (10:50 +0000)
* tree-ssa-operands.c (create_vop_var): Set DECL_IGNORED_P.
(append_use): Run at -O0.
(append_vdef): Likewise.
* tree-ssa-ter.c (ter_is_replaceable_p): Do not special-case -O0.
* tree-ssa-uninit.c (warn_uninitialized_vars): Remove obsolete comment.

From-SVN: r209443

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/uninit-B-O0.c
gcc/testsuite/gcc.dg/uninit-I-O0.c
gcc/testsuite/gcc.dg/uninit-pr19430-O0.c
gcc/tree-ssa-operands.c
gcc/tree-ssa-ter.c
gcc/tree-ssa-uninit.c

index 96e24ea41c5cd1d660ab58eecb22633818c17868..f15c6432194e33e09ec07e9293f57b53170a6137 100644 (file)
@@ -1,3 +1,11 @@
+2014-04-16  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * tree-ssa-operands.c (create_vop_var): Set DECL_IGNORED_P.
+       (append_use): Run at -O0.
+       (append_vdef): Likewise.
+       * tree-ssa-ter.c (ter_is_replaceable_p): Do not special-case -O0.
+       * tree-ssa-uninit.c (warn_uninitialized_vars): Remove obsolete comment.
+
 2014-04-16  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/60844
index ef1964e02d9d33c405f5aa1ff8161a646930cfe8..3c0f63e548f54650c69fa579c127a41474350af1 100644 (file)
@@ -1,3 +1,9 @@
+2014-04-16  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc.dg/uninit-B-O0.c: Remove XFAIL.
+       * gcc.dg/uninit-I-O0.c: Likewise.
+       * gcc.dg/uninit-pr19430-O0.c: Remove some XFAILs.
+
 2014-04-16  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/60844
index e2883a38ea876652d58054bf739924d7b85f2230..5557ace6f8d02ab349c3f387288c6a99b5dcb8a4 100644 (file)
@@ -9,7 +9,7 @@ void
 baz (void)
 {
   int i;
-  if (i) /* { dg-warning "uninit" "uninit i warning" { xfail *-*-* } } */
+  if (i) /* { dg-warning "'i' is used uninitialized in this function" } */
     bar (i);
   foo (&i);
 }
index 655f5489279410f4e035d5fa065917f32a393a10..761f65b485b1f97238133f990c9147cf2124415e 100644 (file)
@@ -3,6 +3,6 @@
 
 int sys_msgctl (void)
 {
-  struct { int mode; } setbuf;  /* { dg-warning "'setbuf\.mode' is used" {} { xfail *-*-* } } */
-  return setbuf.mode;
+  struct { int mode; } setbuf;
+  return setbuf.mode; /* { dg-warning "'setbuf\.mode' is used uninitialized in this function" } */
 }
index 4ce258653d6d55435577d8897d8a8deb5524bd00..63f0b2b44f3e23e1667c6944d73327bbbd432fc0 100644 (file)
@@ -16,10 +16,9 @@ foo (int i)
   return j;
 }
 
-
 int foo2( void ) {
-  int rc;  /* { dg-warning "'rc' is used uninitialized in this function" "uninitialized" { xfail *-*-* } 21 } */
-  return rc;
+  int rc;
+  return rc; /* { dg-warning "'rc' is used uninitialized in this function" } */
   *&rc = 0;
 }
 
@@ -29,7 +28,7 @@ void frob(int *pi);
 int main(void)
 {
   int i; 
-  printf("i = %d\n", i); /* { dg-warning "'i' is used uninitialized in this function" "uninitialized" { xfail *-*-* } 32 } */
+  printf("i = %d\n", i); /* { dg-warning "'i' is used uninitialized in this function" } */
   frob(&i);
 
   return 0;
@@ -38,6 +37,6 @@ int main(void)
 void foo3(int*);
 void bar3(void) { 
   int x; 
-  if(x) /* { dg-warning "'x' is used uninitialized in this function" "uninitialized" { xfail *-*-* } 41 } */
+  if(x) /* { dg-warning "'x' is used uninitialized in this function" } */
     foo3(&x); 
 }
index c525fe579ea2108a167a74a39ddff0562e494041..03d3e4d271ad1098e1a7bf03aac43afab3ae4ff2 100644 (file)
@@ -166,6 +166,7 @@ create_vop_var (struct function *fn)
                           get_identifier (".MEM"),
                           void_type_node);
   DECL_ARTIFICIAL (global_var) = 1;
+  DECL_IGNORED_P (global_var) = 1;
   TREE_READONLY (global_var) = 0;
   DECL_EXTERNAL (global_var) = 1;
   TREE_STATIC (global_var) = 1;
@@ -477,9 +478,6 @@ append_use (tree *use_p)
 static inline void
 append_vdef (tree var)
 {
-  if (!optimize)
-    return;
-
   gcc_assert ((build_vdef == NULL_TREE
               || build_vdef == var)
              && (build_vuse == NULL_TREE
@@ -495,9 +493,6 @@ append_vdef (tree var)
 static inline void
 append_vuse (tree var)
 {
-  if (!optimize)
-    return;
-
   gcc_assert (build_vuse == NULL_TREE
              || build_vuse == var);
 
index 09dc3138a53d4ec5c863a11c4f83794853ffb129..78bedfc2e9a7c489a5d6f8e45d4a29e879d19a1f 100644 (file)
@@ -441,11 +441,6 @@ ter_is_replaceable_p (gimple stmt)
              || (block1 != NULL_TREE && block1 != block2)))
        return false;
 
-      /* Without alias info we can't move around loads.  */
-      if (!optimize && gimple_assign_single_p (stmt)
-         && !is_gimple_val (gimple_assign_rhs1 (stmt)))
-       return false;
-
       return true;
     }
   return false;
index eee83f79a9acaba83ab4aedb7f720af00563f419..1de1394b4b57bc7e624757aca133cc92d02a7299 100644 (file)
@@ -210,7 +210,6 @@ warn_uninitialized_vars (bool warn_possibly_uninitialized)
 
          /* For memory the only cheap thing we can do is see if we
             have a use of the default def of the virtual operand.
-            ???  Note that at -O0 we do not have virtual operands.
             ???  Not so cheap would be to use the alias oracle via
             walk_aliased_vdefs, if we don't find any aliasing vdef
             warn as is-used-uninitialized, if we don't find an aliasing