Commit 61c7fb30 by Eric Botcazou Committed by Eric Botcazou

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
parent 42fae17c
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
......
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
......
......@@ -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);
}
......@@ -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" } */
}
......@@ -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);
}
......@@ -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);
......
......@@ -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;
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment