On 01/19/15 11:30, Martin Liška wrote:
On 01/19/2015 03:48 PM, Jakub Jelinek wrote:
On Mon, Jan 19, 2015 at 03:44:20PM +0100, Martin Liška wrote:
There's a bunch of another places that emit false positives. With
following patch,
I am able to run profiledbootstrap on x86_64-linux-pc and
ppc64-linux-pc.

I don't know what we consider standard and where we allow warnings and
thus
require --disable-werror, so will defer to Richard.

--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -3050,6 +3050,11 @@ 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.  */
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-overflow"

Just I wonder if this shouldn't be guarded by GCC_VERSION >= something
that actually supports those.

Thank you Jakub, you are right that this feature was added in 4.4 ([1]).
I send a new version of the patch.

Thanks,
Martin

[1] https://gcc.gnu.org/gcc-4.4/changes.html

+
  inline tree *
  tree_vec_elt_check (tree __t, int __i,
                      const char *__f, int __l, const char *__g)
@@ -3061,6 +3066,8 @@ tree_vec_elt_check (tree __t, int __i,
    return &CONST_CAST_TREE (__t)->vec.a[__i];
  }

+#pragma GCC diagnostic pop
+
  inline tree *
  omp_clause_elt_check (tree __t, int __i,
                        const char *__f, int __l, const char *__g)

    Jakub



0001-Remove-false-positives-for-warnings-that-break-LTO-p.patch


 From d3fb9b15c2ac00e2e265925b2e822e1e20dc39af Mon Sep 17 00:00:00 2001
From: mliska<mli...@suse.cz>
Date: Mon, 19 Jan 2015 13:30:53 +0100
Subject: [PATCH] Remove false positives for warnings that break LTO profiled
  bootstrap.

gcc/ChangeLog:

2015-01-19  Martin Liska<mli...@suse.cz>

        * tree.h (tree_vec_elt_check): Workaround -Wstrict-overflow
        false positive during profiledbootstrap.

gcc/fortran/ChangeLog:

2015-01-19  Martin Liska<mli...@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.
OK for the trunk.

Thanks for marking these as working around -Wmaybe-uninitialized false positives. I'm going to assume that the initializer value you selected was a good one.

Jeff

Reply via email to