Bug 41345 - [4.5 Regression] bootstrap comparison failure with --disable-checking
Summary: [4.5 Regression] bootstrap comparison failure with --disable-checking
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.5.0
: P1 normal
Target Milestone: 4.5.0
Assignee: Jakub Jelinek
URL:
Keywords:
Depends on:
Blocks: 57257
  Show dependency treegraph
 
Reported: 2009-09-12 18:47 UTC by Ryan Hill
Modified: 2013-05-12 19:54 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-10-26 11:39:40


Attachments
stage 2 bitmap.o (9.18 KB, application/octet-stream)
2009-09-12 18:47 UTC, Ryan Hill
Details
stage 3 bitmap.o (28.99 KB, application/octet-stream)
2009-09-12 18:48 UTC, Ryan Hill
Details
gcc45-pr41345.patch (1.03 KB, patch)
2009-10-26 12:38 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill 2009-09-12 18:47:04 UTC
With current trunk (151649), bootstrap fails during the comparison stage when --disable-checking is used.  GCC was built with:

$ ../configure --disable-checking
$ make -j4

which ultimately results in:

make "DESTDIR=" "RPATH_ENVVAR=LD_LIBRARY_PATH" "TARGET_SUBDIR=x86_64-unknown-linux-gnu" "bindir=/usr/local/bin" "datadir=/usr/local/share" "exec_prefix=/usr/local" "includedir=/usr/local/include" "datarootdir=/usr/local/share" "docdir=/usr/local/share/doc/" "infodir=/usr/local/share/info" "pdfdir=/usr/local/share/doc/" "htmldir=/usr/local/share/doc/" "libdir=/usr/local/lib" "libexecdir=/usr/local/libexec" "lispdir=" "localstatedir=/usr/local/var" "mandir=/usr/local/share/man" "oldincludedir=/usr/include" "prefix=/usr/local" "sbindir=/usr/local/sbin" "sharedstatedir=/usr/local/com" "sysconfdir=/usr/local/etc" "tooldir=/usr/local/x86_64-unknown-linux-gnu" "build_tooldir=/usr/local/x86_64-unknown-linux-gnu" "target_alias=x86_64-unknown-linux-gnu" "AWK=gawk" "BISON=bison" "CC_FOR_BUILD=gcc" "CFLAGS_FOR_BUILD=-g -O2" "CXX_FOR_BUILD=g++" "EXPECT=expect" "FLEX=flex" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS_FOR_BUILD=" "LEX=flex" "M4=m4" "MAKE=make" "RUNTEST=runtest" "RUNTESTFLAGS=" "SED=/bin/sed" "SHELL=/bin/sh" "YACC=bison -y" "`echo 'ADAFLAGS=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "ADA_CFLAGS=" "AR_FLAGS=rc" "`echo 'BOOT_ADAFLAGS=-gnatpg -gnata' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "BOOT_CFLAGS=-g -O2" "BOOT_LDFLAGS=" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCXXFLAGS=-g -O2 -fno-implicit-templates" "STAGE1_CHECKING=--enable-checking=yes,types" "STAGE1_LANGUAGES=c" "GNATBIND=no" "GNATMAKE=no" "AR_FOR_TARGET=ar" "AS_FOR_TARGET=as" "CC_FOR_TARGET=/home/dirtyepic/tmp/gcc-4.5-20090910/build/./gcc/xgcc -B/home/dirtyepic/tmp/gcc-4.5-20090910/build/./gcc/" "CFLAGS_FOR_TARGET=-g -O2" "CPPFLAGS_FOR_TARGET=" "CXX_FOR_TARGET=g++" "CXXFLAGS_FOR_TARGET=-g -O2 -D_GNU_SOURCE" "DLLTOOL_FOR_TARGET=dlltool" "FLAGS_FOR_TARGET=-B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include" "GCJ_FOR_TARGET=" "GFORTRAN_FOR_TARGET=" "LD_FOR_TARGET=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/../../../../x86_64-unknown-linux-gnu/bin/ld" "LIPO_FOR_TARGET=lipo" "LDFLAGS_FOR_TARGET=" "LIBCFLAGS_FOR_TARGET=-g -O2" "LIBCXXFLAGS_FOR_TARGET=-g -O2 -D_GNU_SOURCE -fno-implicit-templates" "NM_FOR_TARGET=nm" "OBJDUMP_FOR_TARGET=objdump" "RANLIB_FOR_TARGET=ranlib" "STRIP_FOR_TARGET=strip" "WINDRES_FOR_TARGET=windres" "WINDMC_FOR_TARGET=windmc" "BUILD_CONFIG=bootstrap-debug" "`echo 'LANGUAGES=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "LEAN=false" "STAGE1_CFLAGS=-g -fkeep-inline-functions" "STAGE1_TFLAGS=" "STAGE2_CFLAGS=-g -O2 -gtoggle" "STAGE2_TFLAGS=" "STAGE3_CFLAGS=-g -O2" "STAGE3_TFLAGS=" "STAGE4_CFLAGS=-g -O2" "STAGE4_TFLAGS=" "STAGEprofile_CFLAGS=-g -O2 -gtoggle -fprofile-generate" "STAGEprofile_TFLAGS=" "STAGEfeedback_CFLAGS=-g -O2 -fprofile-use" "STAGEfeedback_TFLAGS=" "TFLAGS=" "CONFIG_SHELL=/bin/sh" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000"  compare
make[2]: Entering directory `/home/dirtyepic/tmp/gcc-4.5-20090910/build'
make[3]: Entering directory `/home/dirtyepic/tmp/gcc-4.5-20090910/build'
rm -f stage_current
make[3]: Leaving directory `/home/dirtyepic/tmp/gcc-4.5-20090910/build'
Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
gcc/bitmap.o differs
make[2]: *** [compare] Error 1
make[2]: Leaving directory `/home/dirtyepic/tmp/gcc-4.5-20090910/build'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/home/dirtyepic/tmp/gcc-4.5-20090910/build'
make: *** [all] Error 2
Comment 1 Ryan Hill 2009-09-12 18:47:58 UTC
Created attachment 18574 [details]
stage 2 bitmap.o
Comment 2 Ryan Hill 2009-09-12 18:48:38 UTC
Created attachment 18575 [details]
stage 3 bitmap.o
Comment 3 Ryan Hill 2009-09-26 20:46:17 UTC
still broken in -r152199.  is there more info you need?
Comment 4 Christian Adåker 2009-10-25 20:14:30 UTC
This is still present in -r153539, along with some more comparison failures (gcc/tree-vrp.o, gcc/tree-complex.o, gcc/sese.o, gcc/sel-sched.o, gcc/bitmap.o, gcc/lto/lto-lang.o, gcc/cp/class.o).

Could this be of any help? This is a heavily reduced case of one failure in bitmap.o. It fails with 'gcc -c -O2 -fcompare-debug' (but not with -O1) for me on x86_64:

unsigned
bitmap_first_set_bit (unsigned long* bits)
{
  unsigned bit_no = 0;
  unsigned ix = 0;

  for (ix = 0; ix != 1u; ix++)
      if (bits[ix])
	goto found_bit;
  __builtin_unreachable();
 found_bit:

 return bit_no;
}
Comment 5 Jakub Jelinek 2009-10-26 11:39:40 UTC
c#4 confirmed, shorter testcase with -fcompare-debug -O2 -g:
void
foo (int *x)
{
  int a;
  for (a = 0; a < 2; a++)
    if (x[a])
      goto lab;
  __builtin_unreachable ();
lab:;
}
Comment 6 Jakub Jelinek 2009-10-26 12:38:50 UTC
Created attachment 18896 [details]
gcc45-pr41345.patch

Fix I'm going to bootstrap/regtest.
Comment 7 Jakub Jelinek 2009-10-26 20:21:21 UTC
Subject: Bug 41345

Author: jakub
Date: Mon Oct 26 20:21:09 2009
New Revision: 153569

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153569
Log:
	PR bootstrap/41345
	* cfgcleanup.c (trivially_empty_bb_p): New function.
	(try_optimize_bb): Use it instead of checking BB_HEAD == BB_END.

	* gcc.dg/pr41345.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr41345.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgcleanup.c
    trunk/gcc/testsuite/ChangeLog

Comment 8 Jakub Jelinek 2009-10-26 23:12:15 UTC
Fixed.  x86_64-linux and i686-linux bootstrapped/regtested with --disable-checking just fine.
Comment 9 Jeffrey A. Law 2009-10-29 16:38:07 UTC
Subject: Bug 41345

Author: law
Date: Thu Oct 29 16:37:47 2009
New Revision: 153711

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153711
Log:
Recorded merge of revisions 153568-153570 via svnmerge from 
svn+ssh://law@gcc.gnu.org/svn/gcc/trunk

........
  r153568 | jakub | 2009-10-26 14:18:26 -0600 (Mon, 26 Oct 2009) | 10 lines
  
  	PR debug/41828
  	* cp-lang.c (cxx_dwarf_name): Return NULL instead of
  	<anonymous ...> for anonymous aggregate names.
  
  	* dwarf2out.c (add_pubname, add_pubtype, generic_parameter_die,
  	add_name_and_src_coords_attributes, gen_namespace_die,
  	dwarf2out_set_name): Handle dwarf2_name returning NULL.
  
  	* g++.dg/debug/dwarf2/anonname1.C: New test.
........
  r153569 | jakub | 2009-10-26 14:21:09 -0600 (Mon, 26 Oct 2009) | 6 lines
  
  	PR bootstrap/41345
  	* cfgcleanup.c (trivially_empty_bb_p): New function.
  	(try_optimize_bb): Use it instead of checking BB_HEAD == BB_END.
  
  	* gcc.dg/pr41345.c: New test.
........
  r153570 | jakub | 2009-10-26 14:28:24 -0600 (Mon, 26 Oct 2009) | 9 lines
  
  	PR libstdc++/38923
  	* acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Avoid using too many
  	*s.  Accept ld version without text in ()s.
  	* configure: Regenerated.
  
  	* acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid using too many
  	*s.  Accept ld version without text in ()s.
  	* configure: Regenerated.
........

Modified:
    branches/reload-v2a/   (props changed)

Propchange: branches/reload-v2a/
            ('svnmerge-integrated' modified)


Comment 10 hjl@gcc.gnu.org 2009-10-30 16:05:31 UTC
Subject: Bug 41345

Author: hjl
Date: Fri Oct 30 16:04:41 2009
New Revision: 153759

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153759
Log:
2009-10-30  H.J. Lu  <hongjiu.lu@intel.com>

	Backport from mainline:
	2009-10-30  Dodji Seketeli  <dodji@redhat.com>

	PR c++/41863
	* g++.dg/template/sizeof12.C: New test.

	2009-10-29  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/41775
	* g++.dg/torture/pr41775.C: New testcase.

	2009-10-28  Jakub Jelinek  <jakub@redhat.com>

	PR debug/41801
	* g++.dg/ext/sync-3.C: New test.

	2009-10-27  Jakub Jelinek  <jakub@redhat.com>

	PR c++/41020
	* g++.dg/lookup/extern-c-redecl5.C: Fix up regexp.

	2009-10-26  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/41345
	* gcc.dg/pr41345.c: New test.

	2009-10-26  Dodji Seketeli  <dodji@redhat.com>

	PR c++/41785
	* g++.dg/cpp0x/variadic96.C: New test.

	2009-10-26  Dodji Seketeli  <dodji@redhat.com>

	PR c++/41020
	* g++.dg/lookup/extern-c-redecl2.C: New test.
	* g++.dg/lookup/extern-c-redecl3.C: Likewise.
	* g++.dg/lookup/extern-c-redecl4.C: Likewise.
	* g++.dg/lookup/extern-c-redecl5.C: Likewise.

	2009-10-23  Joseph Myers  <joseph@codesourcery.com>

	PR c/40033
	* gcc.dg/noncompile/pr40033-1.c: New test.

	2009-10-23  Joseph Myers  <joseph@codesourcery.com>

	PR c/41673
	* gcc.dg/Wstrict-aliasing-bogus-vla-1.c: New test.

	2009-10-21  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/41497
	* gcc.dg/tree-ssa/pr41497.c: New.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/variadic96.C
      - copied unchanged from r153757, trunk/gcc/testsuite/g++.dg/cpp0x/variadic96.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/ext/sync-3.C
      - copied unchanged from r153757, trunk/gcc/testsuite/g++.dg/ext/sync-3.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/lookup/extern-c-redecl2.C
      - copied unchanged from r153757, trunk/gcc/testsuite/g++.dg/lookup/extern-c-redecl2.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/lookup/extern-c-redecl3.C
      - copied unchanged from r153757, trunk/gcc/testsuite/g++.dg/lookup/extern-c-redecl3.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/lookup/extern-c-redecl4.C
      - copied unchanged from r153757, trunk/gcc/testsuite/g++.dg/lookup/extern-c-redecl4.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C
      - copied unchanged from r153757, trunk/gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/sizeof12.C
      - copied unchanged from r153757, trunk/gcc/testsuite/g++.dg/template/sizeof12.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr41775.C
      - copied unchanged from r153757, trunk/gcc/testsuite/g++.dg/torture/pr41775.C
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-vla-1.c
      - copied unchanged from r153758, trunk/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-vla-1.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/noncompile/pr40033-1.c
      - copied unchanged from r153758, trunk/gcc/testsuite/gcc.dg/noncompile/pr40033-1.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr41345.c
      - copied unchanged from r153757, trunk/gcc/testsuite/gcc.dg/pr41345.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/tree-ssa/pr41497.c
      - copied unchanged from r153758, trunk/gcc/testsuite/gcc.dg/tree-ssa/pr41497.c
Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog

Comment 11 Ozkan Sezer 2009-10-31 07:50:56 UTC
(In reply to comment #10)
> 
> Author: hjl
> Date: Fri Oct 30 16:04:41 2009
> New Revision: 153759
> 
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153759
> Log:
> 2009-10-30  H.J. Lu  <hongjiu.lu@intel.com>
> 
>         Backport from mainline:

>         PR bootstrap/41345
>         * gcc.dg/pr41345.c: New test.

This one fails:

Executing on host: /home/ozzie/gcc44.build/gcc/xgcc -B/home/ozzie/gcc44.build/gcc/ /home/ozzie/gcc44.r153759/gcc/testsuite/gcc.dg/pr41345.c   -O2 -g -fcompare
-debug -S  -o pr41345.s    (timeout = 300)
cc1: error: unrecognized command line option "-fcompare-debug"
compiler exited with status 1
output is:
cc1: error: unrecognized command line option "-fcompare-debug"

FAIL: gcc.dg/pr41345.c (test for excess errors)

Is it not a 4.5-only thing?