This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Initialize variable in order to survive PGO bootstrap.
- From: Martin Liška <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard Biener <richard dot guenther at gmail dot com>
- Date: Fri, 3 Nov 2017 09:52:23 +0100
- Subject: [PATCH] Initialize variable in order to survive PGO bootstrap.
- Authentication-results: sourceware.org; auth=none
Hi.
This is oneliner that fixes PGO bootstrap. I've discussed that with Richi and the core is correct.
However we probably don't have an attribute that will ignore the warning?
Only option is to push/pop Wuninitialized warning.
Ready for trunk?
Thanks,
Martin
gcc/ChangeLog:
2017-11-03 Martin Liska <mliska@suse.cz>
* tree-vrp.c (vrp_int_const_binop): Initialize to wi::zero.
---
gcc/tree-vrp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 63ee1568990..c24a9bfff3c 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -1614,7 +1614,7 @@ vrp_int_const_binop (enum tree_code code, tree val1, tree val2,
{
bool overflow = false;
signop sign = TYPE_SIGN (TREE_TYPE (val1));
- wide_int res;
+ wide_int res = wi::zero (0);
*overflow_p = false;