[PATCH] PR86957

Thomas Schwinge thomas@codesourcery.com
Wed Dec 5 11:33:00 GMT 2018


Sorry for my late follow-up; had a lot of catch up to do back then.

On Thu, 27 Sep 2018 11:47:31 +0200, Richard Biener <richard.guenther@gmail.com> wrote:
> On Mon, Sep 24, 2018 at 9:14 PM Indu Bhagat <indu.bhagat@oracle.com> wrote:
> >
> > Done. Attached is updated patch.
> >
> > Patch is tested on x86_64
> You obviously did _not_ properly test the patch since it causes a
> bunch of new testsuite
> failures: [...]
> and more.  Please get up to speed with GCC development and testing requirements!

Also, with this commit, several test cases regressed from PASS to
UNSUPPORTED because of "{ dg-require-effective-target freorder }" running

    fprofile_use_freorder16732.c: In function 'void foo()':
    fprofile_use_freorder16732.c:2:20: warning: '[...]/gcc/testsuite/g++/fprofile_use_freorder16732.gcda' profile count data file not found [-Wmissing-profile]

Iain had just mentioned that in <https://gcc.gnu.org/PR88310>, and fixed
in r266785, <https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00209.html>.
(Back then, I had produced the same fix, but not yet posted.)  :-|

With "{ dg-require-effective-target freorder }" thusly restored, I then
also saw two other regressions/FAILs, back then:

    [-UNSUPPORTED: g++.dg/tree-prof/pr63581.C-]
    UNSUPPORTED: g++.dg/tree-prof/pr63581.C -fauto-profile
    {+PASS: g++.dg/tree-prof/pr63581.C compilation,  -fprofile-generate -D_PROFILE_GENERATE+}
    {+FAIL: g++.dg/tree-prof/pr63581.C compilation,  -fprofile-use -D_PROFILE_USE+}
    {+PASS: g++.dg/tree-prof/pr63581.C execution,    -fprofile-generate -D_PROFILE_GENERATE+}
    {+UNRESOLVED: g++.dg/tree-prof/pr63581.C execution,    -fprofile-use -D_PROFILE_USE+}
    [...]/gcc/testsuite/g++.dg/tree-prof/pr63581.C: In function 'int uptodate(page*)':
    [...]/gcc/testsuite/g++.dg/tree-prof/pr63581.C:28:19: warning: profile for function 'int uptodate(page*)' not found in profile data [-Wmissing-profile]

..., and:

    [-UNSUPPORTED: gcc.dg/tree-prof/20041218-1.c-]
    UNSUPPORTED: gcc.dg/tree-prof/20041218-1.c -fauto-profile
    {+PASS: gcc.dg/tree-prof/20041218-1.c compilation,  -fprofile-generate -D_PROFILE_GENERATE+}
    {+FAIL: gcc.dg/tree-prof/20041218-1.c compilation,  -fprofile-use -D_PROFILE_USE+}
    {+PASS: gcc.dg/tree-prof/20041218-1.c execution,    -fprofile-generate -D_PROFILE_GENERATE+}
    {+UNRESOLVED: gcc.dg/tree-prof/20041218-1.c execution,    -fprofile-use -D_PROFILE_USE+}
    [...]/gcc/testsuite/gcc.dg/tree-prof/20041218-1.c: In function 'bar':
    [...]/gcc/testsuite/gcc.dg/tree-prof/20041218-1.c:58:1: warning: profile for function 'bar' not found in profile data [-Wmissing-profile]

..., for which I came up with the following patch.

But, this doesn't now seem to be necessary anymore, or am I confused?
Maybe this got fixed differently -- or is anybody still seeing these
FAILs?  (If not, then I'm not proposing to commit this, of course.)

commit 04ad00f79075a0c5eff1f806959918081e54684c
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Wed Oct 31 23:29:32 2018 +0100

    Avoid two -Wmissing-profile diagnostics
 gcc/testsuite/g++.dg/tree-prof/pr63581.C    |    5 +++++
 gcc/testsuite/gcc.dg/tree-prof/20041218-1.c |    5 +++++
 2 files changed, 10 insertions(+)

diff --git gcc/testsuite/g++.dg/tree-prof/pr63581.C gcc/testsuite/g++.dg/tree-prof/pr63581.C
index c8caf07..9800851 100644
--- gcc/testsuite/g++.dg/tree-prof/pr63581.C
+++ gcc/testsuite/g++.dg/tree-prof/pr63581.C
@@ -25,10 +25,15 @@ __attribute__((noinline)) static int zero (void)
   return ii;
+#pragma GCC diagnostic push
+/* WARNING: profopt.exp does not support dg-warning */
+/* "profile for function 'int uptodate(page*)' not found in profile data" */
+#pragma GCC diagnostic ignored "-Wmissing-profile"
 static inline int uptodate (struct page* p)
   return (p->i < 709);
+#pragma GCC diagnostic pop
 static struct page* bar(int i)
diff --git gcc/testsuite/gcc.dg/tree-prof/20041218-1.c gcc/testsuite/gcc.dg/tree-prof/20041218-1.c
index cbd1c7c..41c60a7 100644
--- gcc/testsuite/gcc.dg/tree-prof/20041218-1.c
+++ gcc/testsuite/gcc.dg/tree-prof/20041218-1.c
@@ -54,6 +54,10 @@ check (void *x, struct S *y)
   return 1;
+#pragma GCC diagnostic push
+/* WARNING: profopt.exp does not support dg-warning */
+/* "profile for function 'bar' not found in profile data" */
+#pragma GCC diagnostic ignored "-Wmissing-profile"
 static struct V *
 bar (unsigned int x, void *y)
@@ -75,6 +79,7 @@ bar (unsigned int x, void *y)
     return (void *) 0;
   return u;
+#pragma GCC diagnostic pop
 foo (unsigned int *x, unsigned int y, void **z)


More information about the Gcc-patches mailing list