aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2014-04-16 10:50:58 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2014-04-16 10:50:58 +0000
commit61c7fb308a746e03d3ae8ba54234a8e18b2479da (patch)
tree0bef9cf3d4562a596b955f1762e194e90daca6b5 /gcc
parent42fae17c3741000efa1124cd0af0665ff6141f05 (diff)
downloadgcc-61c7fb308a746e03d3ae8ba54234a8e18b2479da.zip
gcc-61c7fb308a746e03d3ae8ba54234a8e18b2479da.tar.gz
gcc-61c7fb308a746e03d3ae8ba54234a8e18b2479da.tar.bz2
tree-ssa-operands.c (create_vop_var): Set DECL_IGNORED_P.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/uninit-B-O0.c2
-rw-r--r--gcc/testsuite/gcc.dg/uninit-I-O0.c4
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr19430-O0.c9
-rw-r--r--gcc/tree-ssa-operands.c7
-rw-r--r--gcc/tree-ssa-ter.c5
-rw-r--r--gcc/tree-ssa-uninit.c1
8 files changed, 22 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 96e24ea..f15c643 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ef1964e..3c0f63e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/gcc.dg/uninit-B-O0.c b/gcc/testsuite/gcc.dg/uninit-B-O0.c
index e2883a3..5557ace 100644
--- a/gcc/testsuite/gcc.dg/uninit-B-O0.c
+++ b/gcc/testsuite/gcc.dg/uninit-B-O0.c
@@ -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);
}
diff --git a/gcc/testsuite/gcc.dg/uninit-I-O0.c b/gcc/testsuite/gcc.dg/uninit-I-O0.c
index 655f548..761f65b 100644
--- a/gcc/testsuite/gcc.dg/uninit-I-O0.c
+++ b/gcc/testsuite/gcc.dg/uninit-I-O0.c
@@ -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" } */
}
diff --git a/gcc/testsuite/gcc.dg/uninit-pr19430-O0.c b/gcc/testsuite/gcc.dg/uninit-pr19430-O0.c
index 4ce2586..63f0b2b 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr19430-O0.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr19430-O0.c
@@ -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);
}
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index c525fe5..03d3e4d 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -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);
diff --git a/gcc/tree-ssa-ter.c b/gcc/tree-ssa-ter.c
index 09dc313..78bedfc 100644
--- a/gcc/tree-ssa-ter.c
+++ b/gcc/tree-ssa-ter.c
@@ -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;
diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c
index eee83f7..1de1394 100644
--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -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