On 8/10/20 5:42 AM, Martin Liška wrote:
On 8/5/20 4:27 PM, Gerald Pfeifer wrote:
Hi Aldy,

On Fri, 31 Jul 2020, Aldy Hernandez via Gcc-patches wrote:
Jeff approved this patch off-list.  I will re-run tests once again and
commit by Monday.

I believe this has broken the bootstrap with clang (specifically
FreeBSD clang version 10.0.0):

In file included from /scratch/tmp/gerald/GCC-HEAD/gcc/c/gimple-parser.c:44:
In file included from /scratch/tmp/gerald/GCC-HEAD/gcc/tree-vrp.h:23:
/scratch/tmp/gerald/GCC-HEAD/gcc/value-range.h:347:1: error: static declaration of 'gt_ggc_mx' follows non-static declaration gt_ggc_mx (int_range<N> *x) /scratch/tmp/gerald/GCC-HEAD/gcc/value-range.h:150:37: note: previous declaration is here
   template <unsigned X> friend void gt_ggc_mx (int_range<X> *);
                                     ^

/scratch/tmp/gerald/GCC-HEAD/gcc/value-range.h:358:1: error: static declaration of 'gt_pch_nx' follows non-static declaration gt_pch_nx (int_range<N> *x) /scratch/tmp/gerald/GCC-HEAD/gcc/value-range.h:151:37: note: previous declaration is here
   template <unsigned X> friend void gt_pch_nx (int_range<X> *);
                                     ^

My daily tester started to 20200803T1640, so the root cause of this must
have entered GCC trunk between Sunday 16:40 UTC and Monday 16:40 UTC.

Gerald


Hey.

This one is still broken. Can you please Aldy take a look?
It's good that GCC code base can be compiled with clang ;)

My bad.  I thought Gerald had committed the inline fix as well.

OK pending tests?

gcc/ChangeLog:

        * value-range.h (gt_ggc_mx): Declare inline.
        (gt_pch_nx): Same.
---
 gcc/value-range.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/value-range.h b/gcc/value-range.h
index e3282c4ad03..1ab39939703 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -343,7 +343,7 @@ range_includes_zero_p (const irange *vr)
 }

 template<unsigned N>
-static inline void
+inline void
 gt_ggc_mx (int_range<N> *x)
 {
   for (unsigned i = 0; i < N; ++i)
@@ -354,7 +354,7 @@ gt_ggc_mx (int_range<N> *x)
 }

 template<unsigned N>
-static inline void
+inline void
 gt_pch_nx (int_range<N> *x)
 {
   for (unsigned i = 0; i < N; ++i)
@@ -365,7 +365,7 @@ gt_pch_nx (int_range<N> *x)
 }

 template<unsigned N>
-static inline void
+inline void
 gt_pch_nx (int_range<N> *x, gt_pointer_operator op, void *cookie)
 {
   for (unsigned i = 0; i < N; ++i)
--
2.26.2


Reply via email to