aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2015-01-23 16:09:08 +0100
committerMartin Liska <marxin@gcc.gnu.org>2015-01-23 15:09:08 +0000
commit97440db5eb18806601d0386c9bda9d7b759e1946 (patch)
treebbb02f98da538862784e8a813e85f9f6b000d710 /gcc
parent7c83622c6b1c95cdeb12fa5e6b0ef294c78eff16 (diff)
downloadgcc-97440db5eb18806601d0386c9bda9d7b759e1946.zip
gcc-97440db5eb18806601d0386c9bda9d7b759e1946.tar.gz
gcc-97440db5eb18806601d0386c9bda9d7b759e1946.tar.bz2
Remove false positives for warnings that break LTO profiled
* tree.h (tree_vec_elt_check): Workaround -Wstrict-overflow false positive during profiledbootstrap. * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized false positive during profiledbootstrap by initializing them. * matchexp.c (match_mult_operand): Likewise. * module.c (write_atom): Likewise. (read_module): Likewise. From-SVN: r220042
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/fortran/ChangeLog8
-rw-r--r--gcc/fortran/decl.c5
-rw-r--r--gcc/fortran/matchexp.c4
-rw-r--r--gcc/fortran/module.c9
-rw-r--r--gcc/tree.h11
6 files changed, 38 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b5beaf6..2b53eed 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-23 Martin Liska <mliska@suse.cz>
+
+ * tree.h (tree_vec_elt_check): Workaround -Wstrict-overflow
+ false positive during profiledbootstrap.
+
2015-01-23 Tom de Vries <tom@codesourcery.com>
PR libgomp/64672
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index bb66356..26af041 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,11 @@
+2015-01-23 Martin Liska <mliska@suse.cz>
+
+ * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized
+ false positive during profiledbootstrap by initializing them.
+ * matchexp.c (match_mult_operand): Likewise.
+ * module.c (write_atom): Likewise.
+ (read_module): Likewise.
+
2015-01-23 Tom de Vries <tom@codesourcery.com>
PR libgomp/64672
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 2a200fc..cc35c65 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -6391,7 +6391,10 @@ attr_decl1 (void)
{
char name[GFC_MAX_SYMBOL_LEN + 1];
gfc_array_spec *as;
- gfc_symbol *sym;
+
+ /* Workaround -Wmaybe-uninitialized false positive during
+ profiledbootstrap by initializing them. */
+ gfc_symbol *sym = NULL;
locus var_locus;
match m;
diff --git a/gcc/fortran/matchexp.c b/gcc/fortran/matchexp.c
index ec07dfc..fc35c8c 100644
--- a/gcc/fortran/matchexp.c
+++ b/gcc/fortran/matchexp.c
@@ -258,7 +258,9 @@ match_add_op (void)
static match
match_mult_operand (gfc_expr **result)
{
- gfc_expr *e, *exp, *r;
+ /* Workaround -Wmaybe-uninitialized false positive during
+ profiledbootstrap by initializing them. */
+ gfc_expr *e = NULL, *exp, *r;
locus where;
match m;
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index c47489a..4cfc0e2 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -1536,7 +1536,10 @@ static void
write_atom (atom_type atom, const void *v)
{
char buffer[20];
- int i, len;
+
+ /* Workaround -Wmaybe-uninitialized false positive during
+ profiledbootstrap by initializing them. */
+ int i = 0, len;
const char *p;
switch (atom)
@@ -4908,7 +4911,9 @@ read_module (void)
const char *p;
char name[GFC_MAX_SYMBOL_LEN + 1];
int i;
- int ambiguous, j, nuse, symbol;
+ /* Workaround -Wmaybe-uninitialized false positive during
+ profiledbootstrap by initializing them. */
+ int ambiguous = 0, j, nuse, symbol = 0;
pointer_info *info, *q;
gfc_use_rename *u = NULL;
gfc_symtree *st;
diff --git a/gcc/tree.h b/gcc/tree.h
index d8eaff6..6c69fce 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -3050,6 +3050,13 @@ tree_int_cst_elt_check (tree __t, int __i,
return &CONST_CAST_TREE (__t)->int_cst.val[__i];
}
+/* Workaround -Wstrict-overflow false positive during profiledbootstrap. */
+
+# if GCC_VERSION >= 4004
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
+#endif
+
inline tree *
tree_vec_elt_check (tree __t, int __i,
const char *__f, int __l, const char *__g)
@@ -3061,6 +3068,10 @@ tree_vec_elt_check (tree __t, int __i,
return &CONST_CAST_TREE (__t)->vec.a[__i];
}
+# if GCC_VERSION >= 4004
+#pragma GCC diagnostic pop
+#endif
+
inline tree *
omp_clause_elt_check (tree __t, int __i,
const char *__f, int __l, const char *__g)