* 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
+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
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);
}
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" } */
}
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;
}
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;
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);
}
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;
static inline void
append_vdef (tree var)
{
- if (!optimize)
- return;
-
gcc_assert ((build_vdef == NULL_TREE
|| build_vdef == var)
&& (build_vuse == NULL_TREE
static inline void
append_vuse (tree var)
{
- if (!optimize)
- return;
-
gcc_assert (build_vuse == NULL_TREE
|| build_vuse == var);
|| (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;
/* 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