This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/80531] [7 Regression] RC1 bootstrap comparison failure


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80531

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmalcolm at gcc dot gnu.org

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
That patch seems to help for libgomp, but unlike that case where I really don't
believe anything changes with checking vs. non-checking,
I see
make[3]: Leaving directory '/scratch/jakub/gcc/obj'
Comparing stages 2 and 3
warning: gcc/cc1obj-checksum.o differs
Bootstrap comparison failure!
gcc/function-tests.o differs
Makefile:20816: recipe for target 'compare' failed
make[2]: *** [compare] Error 1
make[2]: Leaving directory '/scratch/jakub/gcc/obj'
and that one is indeed --enable-checking related.
The problem is that all these selftest*.c and *-tests.c files are empty if
!CHECKING_P and in that case AIX has to use random seed, because there are no
global symbols.  So I see between stage2 and stage3
-_GLOBAL__F_.._.._gcc_function_tests.c_DFF67DD7_0xfa437af2ab912314 T         
96
+_GLOBAL__F_.._.._gcc_function_tests.c_DFF67DD7_0xf71dd65310bc49d6 T         
96
difference.

Perhaps we want something like (it will help non-release checking builds too by
making the self-test objects adjacent):
--- gcc/Makefile.in.jj  2017-04-25 21:44:02.000000000 +0200
+++ gcc/Makefile.in     2017-04-27 18:32:06.661511629 +0200
@@ -1187,6 +1187,11 @@ C_COMMON_OBJS = c-family/c-common.o c-fa
   c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o \
   c-family/c-attribs.o c-family/c-warn.o

+# The self-test objects that are empty in release checking builds.
+SELFTEST_OBJS = selftest-rtl.o selftest-run-tests.o \
+  function-tests.o ggc-tests.o hash-map-tests.o hash-set-tests.o \
+  rtl-tests.o
+
 # Language-independent object files.
 # We put the *-match.o and insn-*.o files first so that a parallel make
 # will build them sooner, because they are large and otherwise tend to be
@@ -1279,13 +1284,11 @@ OBJS = \
        fold-const.o \
        fold-const-call.o \
        function.o \
-       function-tests.o \
        fwprop.o \
        gcc-rich-location.o \
        gcse.o \
        gcse-common.o \
        ggc-common.o \
-       ggc-tests.o \
        gimple.o \
        gimple-builder.o \
        gimple-expr.o \
@@ -1319,8 +1322,6 @@ OBJS = \
        graphite-sese-to-poly.o \
        gtype-desc.o \
        haifa-sched.o \
-       hash-map-tests.o \
-       hash-set-tests.o \
        hsa-common.o \
        hsa-gen.o \
        hsa-regalloc.o \
@@ -1429,7 +1430,6 @@ OBJS = \
        resource.o \
        rtl-chkp.o \
        rtl-error.o \
-       rtl-tests.o \
        rtl.o \
        rtlhash.o \
        rtlanal.o \
@@ -1443,8 +1443,6 @@ OBJS = \
        sel-sched-ir.o \
        sel-sched-dump.o \
        sel-sched.o \
-       selftest-rtl.o \
-       selftest-run-tests.o \
        sese.o \
        shrink-wrap.o \
        simplify-rtx.o \
@@ -1574,7 +1572,8 @@ OBJS = \
        xcoffout.o \
        $(out_object_file) \
        $(EXTRA_OBJS) \
-       $(host_hook_obj)
+       $(host_hook_obj) \
+       $(SELFTEST_OBJS)

 # Objects in libcommon.a, potentially used by all host binaries and with
 # no target dependencies.
@@ -1607,6 +1606,10 @@ $(ALL_HOST_BACKEND_OBJS): ALL_COMPILERFL
 $(ALL_HOST_BACKEND_OBJS): cc1plus.fda
 endif

+# The self-test objects are empty in release checking builds, make sure
+# AIX/HPUX don't trigger comparison failures on them.
+$(SELFTEST_OBJS) selftest.o: ALL_COMPILERFLAGS += -frandom-seed=$@
+
 # This lists all host object files, whether they are included in this
 # compilation or not.
 ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS) $(ALL_HOST_BACKEND_OBJS)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]