Bug 48403 - [4.7 Regression] bootstrap comparison failure
Summary: [4.7 Regression] bootstrap comparison failure
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.7.0
: P3 blocker
Target Milestone: 4.7.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build, wrong-code
Depends on:
Blocks: 56023
  Show dependency treegraph
 
Reported: 2011-04-01 18:49 UTC by H.J. Lu
Modified: 2013-01-19 10:06 UTC (History)
14 users (show)

See Also:
Host:
Target: {i686,x86_64}-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-04-01 19:40:12


Attachments
diff of disassemly (1.92 KB, text/plain)
2011-04-02 13:38 UTC, Zdenek Sojka
Details
Attempt at correcting memory management for scheduled_insns (764 bytes, patch)
2011-04-02 19:37 UTC, Steven Bosscher
Details | Diff
Testcase for the MIPS ICE (460 bytes, text/plain)
2011-04-04 22:36 UTC, Andrew Pinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2011-04-01 18:49:28 UTC
On Linux/x86, revision 171845 failed to bootstrap:

http://gcc.gnu.org/ml/gcc-regression/2011-04/msg00036.html
http://gcc.gnu.org/ml/gcc-regression/2011-04/msg00037.html

Comparing stages 2 and 3
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
gcc/combine.o differs
gcc/tree-into-ssa.o differs
gcc/graphite-sese-to-poly.o differs
gcc/tree-loop-distribution.o differs
libiberty/regex.o differs
libiberty/pic/regex.o differs
libiberty/sha1.o differs

Revision 171834 is OK.
Comment 1 Andrew Pinski 2011-04-01 19:40:13 UTC
Confirmed.  I can reproduce it also.Bootstrap comparison failure!
gcc/tree-cfg.o differs
gcc/cfgcleanup.o differs
gcc/c-parser.o differs
gcc/fortran/decl.o differs
gcc/fold-const.o differs
gcc/omega.o differs
gcc/ira-color.o differs
gcc/tree-ssa-loop-ivopts.o differs
gcc/sched-rgn.o differs
gcc/sched-deps.o differs
gcc/ira-costs.o differs
gcc/mcf.o differs
gcc/insn-emit.o differs
gcc/i386.o differs
gcc/tree-ssa-loop-ivcanon.o differs
gcc/loop-iv.o differs
gcc/ipa-prop.o differs
gcc/c-decl.o differs
gcc/build/genautomata.o differs
libcpp/expr.o differs
zlib/libz_a-infback.o differs

This is on x86_64-linux-gnu
Comment 2 Dominique d'Humieres 2011-04-01 20:37:56 UTC
Bootstrap comparison failure!
gcc/cfgcleanup.o differs
gcc/cfgloopanal.o differs
gcc/cp/parser.o differs
gcc/cp/tree.o differs
gcc/explow.o differs
gcc/expmed.o differs
gcc/i386.o differs
gcc/java/jcf-parse.o differs
gcc/objcp/objc-next-runtime-abi-01.o differs
gcc/optabs.o differs
gcc/stmt.o differs
gcc/tree-data-ref.o differs
gcc/tree-ssa-ccp.o differs
gcc/tree-vect-stmts.o differs
libiberty/simple-object-mach-o.o differs

on x86_64-apple-darwin10.7.0.
Comment 3 Bernd Schmidt 2011-04-01 23:31:18 UTC
Not reproducible here with either i686-linux or x86_64-linux bootstraps.
Comment 4 Andrew Pinski 2011-04-01 23:33:51 UTC
I use debian 6.0.
Comment 5 H.J. Lu 2011-04-02 00:53:31 UTC
It is caused by revision 171843:

http://gcc.gnu.org/ml/gcc-cvs/2011-04/msg00035.html
Comment 6 Eric Botcazou 2011-04-02 07:57:00 UTC
Confirmed on both platforms, for example:

Bootstrap comparison failure!
gcc/resource.o differs
gcc/ada/sem_case.o differs
gcc/ada/lib.o differs
gcc/ada/exp_ch3.o differs
gcc/ada/sem_ch13.o differs
gcc/ada/exp_ch4.o differs
gcc/ada/sem_util.o differs
gcc/ada/exp_util.o differs
gcc/ada/tbuild.o differs
gcc/ada/prep.o differs
gcc/ada/sem_prag.o differs
gcc/combine.o differs
gcc/tree-iterator.o differs
gcc/gimple-iterator.o differs
gcc/c-decl.o differs
gcc/build/genautomata.o differs
gcc/tree-ssa-structalias.o differs
Comment 7 Bernd Schmidt 2011-04-02 12:33:33 UTC
Tried on Gentoo yesterday, now on Ubuntu 10.04. Still not reproduced. How do the files differ? Would anyone be willing to help debug this?
Comment 8 H.J. Lu 2011-04-02 12:35:18 UTC
(In reply to comment #7)
> Tried on Gentoo yesterday, now on Ubuntu 10.04. Still not reproduced. How do
> the files differ? Would anyone be willing to help debug this?

May I suggest you try Debian 6.0 or Fedora 14?
Comment 9 Zdenek Sojka 2011-04-02 12:40:13 UTC
r171847 failed for me on x86_64 Gentoo as well.
I configured with:
${DIR}/configure --enable-checking=yes,rtl,df --enable-languages=c,c++,lto,fortran --prefix=/mnt/svn/gcc-trunk/binary-${REV}-lto-fortran-checking-yes-rtl-df/ --with-cloog --with-ppl --with-cloog-include=/usr/include/cloog-ppl/
Comment 10 Eric Botcazou 2011-04-02 13:13:57 UTC
> May I suggest you try Debian 6.0 or Fedora 14?

I have the problem on RHEL 5 and SLES 10.
Comment 11 Eric Botcazou 2011-04-02 13:23:51 UTC
> Tried on Gentoo yesterday, now on Ubuntu 10.04. Still not reproduced. How do
> the files differ? Would anyone be willing to help debug this?

For tree-iterator.o:

@@ -146,8 +146,8 @@
  20c:  8d 74 26 00             lea    0x0(%esi),%esi
  210:  8b 6b 14                mov    0x14(%ebx),%ebp
  213:  8b 73 10                mov    0x10(%ebx),%esi
- 216:  c7 43 14 00 00 00 00    movl   $0x0,0x14(%ebx)
- 21d:  c7 43 10 00 00 00 00    movl   $0x0,0x10(%ebx)
+ 216:  c7 43 10 00 00 00 00    movl   $0x0,0x10(%ebx)
+ 21d:  c7 43 14 00 00 00 00    movl   $0x0,0x14(%ebx)
  224:  89 1c 24                mov    %ebx,(%esp)
  227:  e8 fc ff ff ff          call   228 <tsi_link_before+0xe8>
  22c:  85 ed                   test   %ebp,%ebp
@@ -303,8 +303,8 @@
  474:  8d 74 26 00             lea    0x0(%esi),%esi
  478:  8b 6b 14                mov    0x14(%ebx),%ebp
  47b:  8b 73 10                mov    0x10(%ebx),%esi
- 47e:  c7 43 14 00 00 00 00    movl   $0x0,0x14(%ebx)
- 485:  c7 43 10 00 00 00 00    movl   $0x0,0x10(%ebx)
+ 47e:  c7 43 10 00 00 00 00    movl   $0x0,0x10(%ebx)
+ 485:  c7 43 14 00 00 00 00    movl   $0x0,0x14(%ebx)
  48c:  89 1c 24                mov    %ebx,(%esp)
  48f:  e8 fc ff ff ff          call   490 <tsi_link_after+0xd0>
  494:  85 ed                   test   %ebp,%ebp
Comment 12 Zdenek Sojka 2011-04-02 13:38:00 UTC
Created attachment 23852 [details]
diff of disassemly

Configuring with
/mnt/svn/gcc-trunk/configure --enable-languages=c,c++
is enough to reproduce the failure:
Comparing stages 2 and 3
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
gcc/tree-ssa-loop-ivopts.o differs
gcc/tree-ssa-loop-ivcanon.o differs
gcc/build/genautomata.o differs
gcc/fold-const.o differs
gcc/mcf.o differs
gcc/tree-cfg.o differs
gcc/c-parser.o differs
gcc/ira-color.o differs
gcc/ira-costs.o differs
gcc/i386.o differs
gcc/cfgcleanup.o differs
gcc/loop-iv.o differs
gcc/ipa-prop.o differs
gcc/c-decl.o differs
gcc/omega.o differs
gcc/insn-emit.o differs
gcc/sched-rgn.o differs
gcc/sched-deps.o differs
libcpp/expr.o differs
zlib/libz_a-infback.o differs
make[2]: *** [compare] Error 1

Attached is diff if disassemly (objdump -d) of those files from stage2/3.
Comment 13 Bernd Schmidt 2011-04-02 13:43:19 UTC
Downloading Fedora 14 now, but that'll take a while to get set up.

Potentially helpful would be scheduling dumps from stage1 and stage2 compilers for these files; use "-da -fsched-verbose=5".
Comment 14 Steven Bosscher 2011-04-02 13:50:49 UTC
Bernd, if you have a compile farm account: It reproduces on gcc17 for me.
Comment 15 H.J. Lu 2011-04-02 13:55:31 UTC
(In reply to comment #14)
> Bernd, if you have a compile farm account: It reproduces on gcc17 for me.

Can you try

gcc20: a dual Xeon X5670 2.93 GHz 12 cores 24 threads 24 GB RAM system

It is a very fast machine.
Comment 16 H.J. Lu 2011-04-02 14:07:36 UTC
I can reproduce it with C only:

configure --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld --enable-languages=c  --prefix=/usr/gcc-4.7.0 --with-local-prefix=/usr/local --enable-gnu-indirect-function --enable-cloog-backend=isl --with-ppl-include=/opt/gnu/include --with-ppl-lib=/opt/gnu/lib64 --with-cloog-include=/opt/gnu/include --with-cloog-lib=/opt/gnu/lib64 --with-fpmath=sse
Comment 17 Steven Bosscher 2011-04-02 15:08:33 UTC
FWIW: 171842 is OK, 171843 gives the comparison failure. No surprise, I suppose, but for the record...
Comment 18 Steven Bosscher 2011-04-02 19:16:17 UTC
Something appears to be wrong with the allocation of scheduled_insns:

* It is VEC_alloc'ed on the heap in sched_extend_ready_list() but it is never VEC_free'ed.

* It is allocated if sched_ready_n_insns == -1, which is the initial state ("static int sched_ready_n_insns = -1;") and also the state after sched_finish_ready_list(). Therefore, AFAICU, a schedule_insns VEC is leaked for each region.

I would have VEC_alloc'ed schedule_insns once, at the start of the scheduler, and VEC_reserve elements in sched_extend_ready_list().  But I am not sufficiently familiar with the scheduler to propose a patch.
Comment 19 Steven Bosscher 2011-04-02 19:37:03 UTC
Created attachment 23856 [details]
Attempt at correcting memory management for scheduled_insns

Currently trying to see if this bootstraps. Even if this is not the fix for the comparison failure, something like this still ought to be applied to correct the usage of the VEC data structure.
Comment 20 Steven Bosscher 2011-04-02 19:55:07 UTC
Doesn't fix the comparison failure.
Comment 21 Bernd Schmidt 2011-04-03 00:10:06 UTC
Okay, the problem showed up on Fedora 14 (no idea why only there). The bug is that I've missed some uses of last_scheduled_insn. Will probably be able to post a fix on Monday.
Comment 22 revital.eres 2011-04-03 11:52:47 UTC
(In reply to comment #0)
> On Linux/x86, revision 171845 failed to bootstrap:

There is bootsrap failure also on powerpc64-suse-linux using trunk -r171899

 ../gcc/configure --enable-bootstrap --enable-checking --enable-languages=c,c++,fortran

make bootstrap BOOT_CFLAGS="-O2" 

make[3]: Leaving directory `/home/eres/mainline/build1'
Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
gcc/collect2.o differs
gcc/sel-sched-ir.o differs
gcc/c-decl.o differs
gcc/ira-costs.o differs
gcc/tree-parloops.o differs
gcc/calls.o differs
gcc/fortran/trans-types.o differs
gcc/fortran/resolve.o differs
gcc/fortran/intrinsic.o differs
gcc/fortran/trans-intrinsic.o differs
gcc/fortran/trans-expr.o differs
gcc/fortran/expr.o differs
gcc/fortran/simplify.o differs
gcc/tree-ssa-loop-ivopts.o differs
gcc/c-parser.o differs
gcc/gimplify.o differs
gcc/tree-vect-loop.o differs
gcc/sel-sched-dump.o differs
gcc/var-tracking.o differs
gcc/bitmap.o differs
gcc/build/genautomata.o differs
gcc/dwarf2out.o differs
gcc/et-forest.o differs
gcc/tree-vect-loop-manip.o differs
gcc/omega.o differs
gcc/pretty-print.o differs
gcc/fold-const.o differs
gcc/df-scan.o differs
gcc/cse.o differs
gcc/tree-ssa-structalias.o differs
gcc/expr.o differs
gcc/c-family/c-format.o differs
gcc/c-family/c-ada-spec.o differs
gcc/tree-into-ssa.o differs
gcc/ggc-common.o differs
gcc/ira-color.o differs
gcc/ira.o differs
gcc/cp/parser.o differs
gcc/cp/call.o differs
gcc/cp/pt.o differs
gcc/df-problems.o differs
gcc/recog.o differs
gmp/mpn/dive_1.o differs
gmp/mpn/sqrmod_bnm1.o differs
gmp/mpn/mod_1_4.o differs
gmp/mpn/toom32_mul.o differs
gmp/mpn/mod_1_3.o differs
gmp/mpn/invertappr.o differs
gmp/mpn/toom42_mul.o differs
gmp/mpn/mod_1_2.o differs
gmp/mpn/get_str.o differs
libcpp/traditional.o differs
libcpp/expr.o differs
libiberty/pic/regex.o differs
libiberty/pic/cplus-dem.o differs
libiberty/pic/md5.o differs
libiberty/pic/sha1.o differs
libiberty/regex.o differs
libiberty/cplus-dem.o differs
libiberty/md5.o differs
libiberty/sha1.o differs
mpfr/vasprintf.o differs
mpfr/zeta_ui.o differs
zlib/libz_a-inffast.o differs
make[2]: *** [compare] Error 1
make[2]: Leaving directory `/home/eres/mainline/build1'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/home/eres/mainline/build1'
Comment 23 revital.eres 2011-04-03 18:01:23 UTC
(In reply to comment #22)
> (In reply to comment #0)
> > On Linux/x86, revision 171845 failed to bootstrap:
> There is bootsrap failure also on powerpc64-suse-linux using trunk -r171899

Same error occurs on arm-linux-gnueabi with trunk -r171899 configured with:

../gcc/configure --enable-checking --enable-languages=c --enable-bootstrap --with-arch=armv7-a --with-mode=thumb

make command:

make bootstrap BOOT_CFLAGS="-O2 "
Comment 24 Dominique d'Humieres 2011-04-04 06:30:12 UTC
Bootstrap comparison failure!
gcc/c-family/c-ada-spec.o differs
gcc/c-family/c-format.o differs
gcc/c-parser.o differs
gcc/cfgexpand.o differs
gcc/cp/parser.o differs
gcc/cse.o differs
gcc/emit-rtl.o differs
gcc/expmed.o differs
gcc/fortran/parse.o differs
gcc/fortran/trans-intrinsic.o differs
gcc/gimplify.o differs
gcc/graphite-clast-to-gimple.o differs
gcc/ifcvt.o differs
gcc/ipa-inline.o differs
gcc/ipa-prop.o differs
gcc/ira-lives.o differs
gcc/java/jcf-parse.o differs
gcc/lto/lto-object.o differs
gcc/lto-streamer-in.o differs
gcc/lto-streamer-out.o differs
gcc/mcf.o differs
gcc/objc/objc-next-runtime-abi-02.o differs
gcc/objcp/objc-next-runtime-abi-02.o differs
gcc/optabs.o differs
gcc/postreload.o differs
gcc/reload.o differs
gcc/rtlanal.o differs
gcc/tree-ssa-coalesce.o differs
gcc/tree-ssa-loop-ivopts.o differs
gcc/tree-ssa-loop-niter.o differs
libcpp/directives.o differs
libcpp/traditional.o differs
libiberty/cplus-dem.o differs
libiberty/sha1.o differs

on powerpc-apple-darwin9.
Comment 25 Andreas Krebbel 2011-04-04 16:13:26 UTC
Bootstrap fails on s390 and s390x as well.
Comment 26 hjl@gcc.gnu.org 2011-04-04 16:53:57 UTC
Author: hjl
Date: Mon Apr  4 16:53:51 2011
New Revision: 171942

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171942
Log:
Fix PR bootstrap/48403.

2011-04-04  Bernd Schmidt  <bernds@codesourcery.com>

	PR bootstrap/48403
	* haifa-sched.c (nonscheduled_insns_begin): New static variable.
	(rank_for_schedule): Use scheduled_insns vector instead of
	last_scheduled_insn.
	(ok_for_early_queue_removal): Likewise.
	(queue_to_ready): Search forward in nonscheduled_insns_begin if
	we have a dbg_cnt.
	(choose_ready): Likewise.
	(commit_schedule): Use VEC_iterate.
	(schedule_block): Initialize nonscheduled_insns_begin.  If we have
	a dbg_cnt, use it and ensure the first insn is in the ready list.
	(haifa_sched_init): Allocate scheduled_insns.
	(sched_extend_ready_list): Don't allocate it; reserve space.
	(haifa_sched_finish): Free it.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/haifa-sched.c
Comment 27 Benjamin Kosnik 2011-04-04 18:17:26 UTC
still fails bootstrap after #26

make[3]: Leaving directory `/mnt/share/bld/gcc-trunk'
Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
gcc/final.o differs
gcc/haifa-sched.o differs
libiberty/cp-demangle.o differs
libiberty/pic/cp-demangle.o differs
make[2]: *** [compare] Error 1
make[2]: Leaving directory `/mnt/share/bld/gcc-trunk'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/mnt/share/bld/gcc-trunk'
make: *** [bootstrap-lean] Error 2
Comment 28 H.J. Lu 2011-04-04 18:25:37 UTC
(In reply to comment #27)
> still fails bootstrap after #26
> 
> make[3]: Leaving directory `/mnt/share/bld/gcc-trunk'

What is your target? It works for me on Linux/ia32 and Linux/x86-64.
Comment 29 Benjamin Kosnik 2011-04-04 18:47:44 UTC
f14 x86_64, no ppl

%rpm -qa | grep mpfr
mpfr-devel-2.4.2-1.fc13.x86_64
mpfr-2.4.2-1.fc13.x86_64
<bkoz@chula> /mnt/share/bld/gcc-trunk                                           %rpm -qa | grep gmp
gmp-devel-4.3.1-7.fc14.x86_64
gmp-4.3.1-7.fc14.x86_64
<bkoz@chula> /mnt/share/bld/gcc-trunk                                           %rpm -qa | grep libmpc
libmpc-devel-0.8.1-1.fc13.x86_64
libmpcdec-1.2.6-6.fc12.i686
libmpcdec-1.2.6-6.fc12.x86_64
libmpc-0.8.1-1.fc13.x86_64

Configured like so:
/mnt/share/src/gcc.svn-trunk/configure --enable-languages=c,c++ --verbose --prefix=/mnt/share/bin/H-x86_64-gcc-trunk --disable-multilib --disable-checking

%uname -a
Linux chula 2.6.35.11-83.fc14.x86_64 #1 SMP Mon Feb 7 07:06:44 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Comment 30 H.J. Lu 2011-04-04 18:52:13 UTC
This

 --enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld --enable-cloog-backend=isl --with-ppl-include=/opt/gnu/include --with-ppl-lib=/opt/gnu/lib64 --with-cloog-include=/opt/gnu/include --with-cloog-lib=/opt/gnu/lib64 --with-fpmath=sse --enable-languages=c,c++,fortran,java,lto,objc

works for me on Fedora 14/x86-64. Please provide your complete configure.
Comment 31 H.J. Lu 2011-04-04 19:41:46 UTC
(In reply to comment #29)
> f14 x86_64, no ppl
> Configured like so:
> /mnt/share/src/gcc.svn-trunk/configure --enable-languages=c,c++ --verbose
> --prefix=/mnt/share/bin/H-x86_64-gcc-trunk --disable-multilib
> --disable-checking

Confirmed.
Comment 32 Steve Ellcey 2011-04-04 19:48:36 UTC
Also failing on IA64 HP-UX and Linux.  With 171843, I get the comparision errors, with 171845 (or ToT that includes the patch from #26), I get an ICE during the stage2 build.



/proj/opensrc/nightly/src/trunk/gcc/errors.c:86:1: internal compiler error: in max_issue, at haifa-sched.c:2524
Please submit a full bug report,
with preprocessed source if appropriate.
Comment 33 Andrew Pinski 2011-04-04 19:50:24 UTC
(In reply to comment #32)
> 
> /proj/opensrc/nightly/src/trunk/gcc/errors.c:86:1: internal compiler error: in
> max_issue, at haifa-sched.c:2524
> Please submit a full bug report,
> with preprocessed source if appropriate.

I get this ICE on MIPS64-linux-gnu compiling libgcc for o32.
Comment 34 Steven Bosscher 2011-04-04 19:53:52 UTC
Perhaps the patches can be reverted until it's clear what is wrong here? The trunk is now broken for 3 days, it will make things like bisecting regressions much harder later on if it stays broken even longer.
Comment 35 H.J. Lu 2011-04-04 19:56:49 UTC
(In reply to comment #31)
> (In reply to comment #29)
> > f14 x86_64, no ppl
> > Configured like so:
> > /mnt/share/src/gcc.svn-trunk/configure --enable-languages=c,c++ --verbose
> > --prefix=/mnt/share/bin/H-x86_64-gcc-trunk --disable-multilib
> > --disable-checking
> 
> Confirmed.

On Linux/ia32,

--enable-languages=c,c++ --disable-checking i686-linux

also leads to

warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
gcc/final.o differs
gcc/haifa-sched.o differs
libiberty/pic/cp-demangle.o differs
libiberty/cp-demangle.o differs
make[3]: *** [compare] Error 1
Comment 36 H.J. Lu 2011-04-04 19:57:14 UTC
(In reply to comment #34)
> Perhaps the patches can be reverted until it's clear what is wrong here? The
> trunk is now broken for 3 days, it will make things like bisecting regressions
> much harder later on if it stays broken even longer.

I agree.
Comment 37 Eric Botcazou 2011-04-04 21:13:51 UTC
> /proj/opensrc/nightly/src/trunk/gcc/errors.c:86:1: internal compiler error: in
> max_issue, at haifa-sched.c:2524
> Please submit a full bug report,
> with preprocessed source if appropriate.

Confirmed.  Reduced testcase for -O2:

typedef __builtin_va_list va_list;

extern void exit (unsigned);
extern int vfprintf (void *s, const char *format, va_list arg);
extern void *stderr;

void fatal (const char *format, ...)
{
  va_list ap;
  __builtin_va_start(ap,format);
  vfprintf (stderr, format, ap);
  __builtin_va_end(ap);
  exit (1);
}

But x86/Linux, x86-64/Linux, x86-64/Darwin, x86/Solaris and SPARC/Solaris now bootstrap fine for me so there is some progress.
Comment 38 Benjamin Kosnik 2011-04-04 21:37:21 UTC
YES, please revert whatever is causing this ASAP. Bootstrap has been broken for much too long, on all the common devel arches.
Comment 39 Bernd Schmidt 2011-04-04 22:27:26 UTC
(In reply to comment #37)

> Confirmed.  Reduced testcase for -O2:
> 
> typedef __builtin_va_list va_list;
> 
> extern void exit (unsigned);
> extern int vfprintf (void *s, const char *format, va_list arg);
> extern void *stderr;
> 
> void fatal (const char *format, ...)
> {
>   va_list ap;
>   __builtin_va_start(ap,format);
>   vfprintf (stderr, format, ap);
>   __builtin_va_end(ap);
>   exit (1);
> }

mips64-linux, right?

$ ./cc1 ebtc.c -O2
fatal
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <whole-program> <ipa-profile> <cp> <inline> <pure-const> <static-var>Assembling functions:
 fatal
Execution times (seconds)
 df scan insns         :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 (20%) wall       0 kB ( 0%) ggc
 parser                :   0.01 (100%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall     155 kB (22%) ggc
 TOTAL                 :   0.01             0.00             0.05                701 kB
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --enable-checking=release to disable checks.
$

How did you configure the toolchain?
Comment 40 Andrew Pinski 2011-04-04 22:36:56 UTC
Created attachment 23873 [details]
Testcase for the MIPS ICE

./cc1 t1.c -mabi=32 -O2 -march=octeon -da -quiet
t1.c: In function ‘__udivmoddi4’:
t1.c:55:1: internal compiler error: in max_issue, at haifa-sched.c:2529
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 41 Benjamin Kosnik 2011-04-05 00:36:50 UTC
I can confirm that r171959 with --enable-checking bootstraps on f14/x86_64/linux, which was not previously the case. Thanks Bernd! I can also assert that it still fails with --disable-checking.

Do I open a new bug report for the --disable-checking bootstrap failure or are we working backwards through the bugs to get back to a known good state with this one?

;)
Comment 42 H.J. Lu 2011-04-05 00:42:39 UTC
(In reply to comment #41)
> I can confirm that r171959 with --enable-checking bootstraps on
> f14/x86_64/linux, which was not previously the case. Thanks Bernd! I can also
> assert that it still fails with --disable-checking.
> 
> Do I open a new bug report for the --disable-checking bootstrap failure or are
> we working backwards through the bugs to get back to a known good state with
> this one?
> 

I opened PR 48444.
Comment 43 Eric Botcazou 2011-04-05 09:02:56 UTC
> mips64-linux, right?

No, IA-64/Linux, I was replying to Steve, but this is indeed not very clear.
Comment 44 Jeffrey A. Law 2011-04-05 15:45:20 UTC
Just a note for those experiencing a comparison failure with --disable-checking, I know what's causing it and should have a fix shortly.    That failure is being tracked by PR48444.
Comment 45 Bernd Schmidt 2011-04-05 22:19:21 UTC
Author: bernds
Date: Tue Apr  5 22:19:17 2011
New Revision: 172006

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172006
Log:
	PR bootstrap/48403
	* haifa-sched.c (schedule_block): Increment cycle_issued_insns only
	if old and new states differ.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/haifa-sched.c
Comment 46 Eric Botcazou 2011-04-05 22:46:08 UTC
Presumably everywhere now.
Comment 47 gfunck 2011-04-08 02:39:06 UTC
Author: gfunck
Date: Fri Apr  8 02:38:59 2011
New Revision: 172160

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172160
Log:
2011-04-07  Gary Funck  <gary@intrepid.com>

	Merge trunk version 172158 into gupc branch.
	to bring in the following fix.

2011-04-05  Bernd Schmidt  <bernds@codesourcery.com>

	PR bootstrap/48403
	* haifa-sched.c (schedule_block): Increment cycle_issued_insns only
	if old and new states differ.


Added:
    branches/gupc/gcc/c-family/c-target-def.h
      - copied unchanged from r172158, trunk/gcc/c-family/c-target-def.h
    branches/gupc/gcc/c-family/c-target.def
      - copied unchanged from r172158, trunk/gcc/c-family/c-target.def
    branches/gupc/gcc/c-family/c-target.h
      - copied unchanged from r172158, trunk/gcc/c-family/c-target.h
    branches/gupc/gcc/config/default-c.c
      - copied unchanged from r172158, trunk/gcc/config/default-c.c
    branches/gupc/gcc/config/rx/rx-opts.h
      - copied unchanged from r172158, trunk/gcc/config/rx/rx-opts.h
    branches/gupc/gcc/target-hooks-macros.h
      - copied unchanged from r172158, trunk/gcc/target-hooks-macros.h
    branches/gupc/gcc/testsuite/c-c++-common/Wcast-qual-1.c
      - copied unchanged from r172158, trunk/gcc/testsuite/c-c++-common/Wcast-qual-1.c
    branches/gupc/gcc/testsuite/g++.dg/cpp0x/enum9.C
      - copied unchanged from r172158, trunk/gcc/testsuite/g++.dg/cpp0x/enum9.C
    branches/gupc/gcc/testsuite/g++.dg/cpp0x/sfinae10.C
      - copied unchanged from r172158, trunk/gcc/testsuite/g++.dg/cpp0x/sfinae10.C
    branches/gupc/gcc/testsuite/g++.dg/cpp0x/sfinae11.C
      - copied unchanged from r172158, trunk/gcc/testsuite/g++.dg/cpp0x/sfinae11.C
    branches/gupc/gcc/testsuite/g++.dg/cpp0x/sfinae7.C
      - copied unchanged from r172158, trunk/gcc/testsuite/g++.dg/cpp0x/sfinae7.C
    branches/gupc/gcc/testsuite/g++.dg/cpp0x/sfinae8.C
      - copied unchanged from r172158, trunk/gcc/testsuite/g++.dg/cpp0x/sfinae8.C
    branches/gupc/gcc/testsuite/g++.dg/cpp0x/sfinae9.C
      - copied unchanged from r172158, trunk/gcc/testsuite/g++.dg/cpp0x/sfinae9.C
    branches/gupc/gcc/testsuite/gcc.dg/guality/pr36977.c
      - copied unchanged from r172158, trunk/gcc/testsuite/gcc.dg/guality/pr36977.c
    branches/gupc/gcc/testsuite/gcc.dg/guality/pr48466.c
      - copied unchanged from r172158, trunk/gcc/testsuite/gcc.dg/guality/pr48466.c
    branches/gupc/gcc/testsuite/gcc.dg/torture/pr48343.c
      - copied unchanged from r172158, trunk/gcc/testsuite/gcc.dg/torture/pr48343.c
    branches/gupc/gcc/testsuite/gcc.dg/tree-ssa/inline-8.c
      - copied unchanged from r172158, trunk/gcc/testsuite/gcc.dg/tree-ssa/inline-8.c
    branches/gupc/gcc/testsuite/gcc.target/arm/pr43920-1.c
      - copied unchanged from r172158, trunk/gcc/testsuite/gcc.target/arm/pr43920-1.c
    branches/gupc/gcc/testsuite/gcc.target/arm/pr43920-2.c
      - copied unchanged from r172158, trunk/gcc/testsuite/gcc.target/arm/pr43920-2.c
    branches/gupc/gcc/testsuite/gfortran.dg/gomp/pr48117.f90
      - copied unchanged from r172158, trunk/gcc/testsuite/gfortran.dg/gomp/pr48117.f90
    branches/gupc/gcc/testsuite/gnat.dg/return3.adb
      - copied unchanged from r172158, trunk/gcc/testsuite/gnat.dg/return3.adb
    branches/gupc/libgo/go/crypto/des/
      - copied from r172158, trunk/libgo/go/crypto/des/
    branches/gupc/libgo/go/os/dir_plan9.go
      - copied unchanged from r172158, trunk/libgo/go/os/dir_plan9.go
    branches/gupc/libgo/go/os/dir_unix.go
      - copied unchanged from r172158, trunk/libgo/go/os/dir_unix.go
    branches/gupc/libgo/go/os/env_plan9.go
      - copied unchanged from r172158, trunk/libgo/go/os/env_plan9.go
    branches/gupc/libgo/go/os/error_plan9.go
      - copied unchanged from r172158, trunk/libgo/go/os/error_plan9.go
    branches/gupc/libgo/go/os/error_posix.go
      - copied unchanged from r172158, trunk/libgo/go/os/error_posix.go
    branches/gupc/libgo/go/os/exec_plan9.go
      - copied unchanged from r172158, trunk/libgo/go/os/exec_plan9.go
    branches/gupc/libgo/go/os/exec_posix.go
      - copied unchanged from r172158, trunk/libgo/go/os/exec_posix.go
    branches/gupc/libgo/go/os/file_plan9.go
      - copied unchanged from r172158, trunk/libgo/go/os/file_plan9.go
    branches/gupc/libgo/go/os/file_posix.go
      - copied unchanged from r172158, trunk/libgo/go/os/file_posix.go
    branches/gupc/libgo/go/os/stat_plan9.go
      - copied unchanged from r172158, trunk/libgo/go/os/stat_plan9.go
    branches/gupc/libgo/go/os/sys_plan9.go
      - copied unchanged from r172158, trunk/libgo/go/os/sys_plan9.go
    branches/gupc/libgo/go/path/filepath/path_plan9.go
      - copied unchanged from r172158, trunk/libgo/go/path/filepath/path_plan9.go
    branches/gupc/libstdc++-v3/testsuite/ext/iota/
      - copied from r172158, trunk/libstdc++-v3/testsuite/ext/iota/
    branches/gupc/libstdc++-v3/testsuite/ext/is_sorted/
      - copied from r172158, trunk/libstdc++-v3/testsuite/ext/is_sorted/
Removed:
    branches/gupc/gcc/testsuite/g++.dg/warn/Wcast-qual2.C
    branches/gupc/gcc/testsuite/gcc.dg/cast-qual-3.c
    branches/gupc/libgo/go/crypto/block/cbc.go
    branches/gupc/libgo/go/crypto/block/cfb.go
    branches/gupc/libgo/go/crypto/block/cfb_aes_test.go
    branches/gupc/libgo/go/crypto/block/cipher.go
    branches/gupc/libgo/go/crypto/block/cmac.go
    branches/gupc/libgo/go/crypto/block/cmac_aes_test.go
    branches/gupc/libgo/go/crypto/block/ctr.go
    branches/gupc/libgo/go/crypto/block/eax.go
    branches/gupc/libgo/go/crypto/block/eax_aes_test.go
    branches/gupc/libgo/go/crypto/block/ecb.go
    branches/gupc/libgo/go/crypto/block/ecb_aes_test.go
    branches/gupc/libgo/go/crypto/block/ecb_test.go
    branches/gupc/libgo/go/crypto/block/ofb.go
    branches/gupc/libgo/go/crypto/block/ofb_aes_test.go
    branches/gupc/libgo/go/crypto/block/xor.go
    branches/gupc/libgo/go/crypto/block/xor_test.go
Modified:
    branches/gupc/   (props changed)
    branches/gupc/ChangeLog
    branches/gupc/MAINTAINERS
    branches/gupc/Makefile.def
    branches/gupc/Makefile.in
    branches/gupc/boehm-gc/ChangeLog
    branches/gupc/boehm-gc/testsuite/lib/boehm-gc.exp
    branches/gupc/config.sub
    branches/gupc/configure
    branches/gupc/configure.ac
    branches/gupc/gcc/ChangeLog
    branches/gupc/gcc/ChangeLog.upc
    branches/gupc/gcc/DATESTAMP
    branches/gupc/gcc/Makefile.in
    branches/gupc/gcc/basic-block.h
    branches/gupc/gcc/c-family/ChangeLog
    branches/gupc/gcc/c-family/c-common.c
    branches/gupc/gcc/c-family/c-common.h
    branches/gupc/gcc/c-family/c-format.c
    branches/gupc/gcc/c-family/c-opts.c
    branches/gupc/gcc/cfgcleanup.c
    branches/gupc/gcc/cfghooks.c
    branches/gupc/gcc/cfghooks.h
    branches/gupc/gcc/cfgrtl.c
    branches/gupc/gcc/cgraph.c
    branches/gupc/gcc/cgraph.h
    branches/gupc/gcc/combine.c
    branches/gupc/gcc/config.gcc
    branches/gupc/gcc/config/alpha/osf5.h
    branches/gupc/gcc/config/arm/arm.c
    branches/gupc/gcc/config/arm/arm.h
    branches/gupc/gcc/config/arm/arm.md
    branches/gupc/gcc/config/arm/constraints.md
    branches/gupc/gcc/config/arm/neon.md
    branches/gupc/gcc/config/darwin-c.c
    branches/gupc/gcc/config/darwin-protos.h
    branches/gupc/gcc/config/darwin.h
    branches/gupc/gcc/config/i386/i386.c
    branches/gupc/gcc/config/i386/i386.md
    branches/gupc/gcc/config/i386/predicates.md
    branches/gupc/gcc/config/i386/sse.md
    branches/gupc/gcc/config/m68k/m68k.c
    branches/gupc/gcc/config/m68k/m68k.h
    branches/gupc/gcc/config/m68k/m68k.opt
    branches/gupc/gcc/config/m68k/t-mlibs
    branches/gupc/gcc/config/mips/mips.h
    branches/gupc/gcc/config/mn10300/mn10300.md
    branches/gupc/gcc/config/rs6000/rs6000.c
    branches/gupc/gcc/config/rx/rx.c
    branches/gupc/gcc/config/rx/rx.h
    branches/gupc/gcc/config/rx/rx.opt
    branches/gupc/gcc/config/t-darwin
    branches/gupc/gcc/cp/ChangeLog
    branches/gupc/gcc/cp/call.c
    branches/gupc/gcc/cp/cp-tree.h
    branches/gupc/gcc/cp/cvt.c
    branches/gupc/gcc/cp/except.c
    branches/gupc/gcc/cp/init.c
    branches/gupc/gcc/cp/parser.c
    branches/gupc/gcc/cp/pt.c
    branches/gupc/gcc/cp/semantics.c
    branches/gupc/gcc/cp/tree.c
    branches/gupc/gcc/cp/typeck.c
    branches/gupc/gcc/cp/typeck2.c
    branches/gupc/gcc/cprop.c
    branches/gupc/gcc/dbxout.c
    branches/gupc/gcc/debug.h
    branches/gupc/gcc/doc/install.texi
    branches/gupc/gcc/doc/invoke.texi
    branches/gupc/gcc/doc/tm.texi
    branches/gupc/gcc/doc/tm.texi.in
    branches/gupc/gcc/dwarf2out.c
    branches/gupc/gcc/final.c
    branches/gupc/gcc/fortran/ChangeLog
    branches/gupc/gcc/fortran/f95-lang.c
    branches/gupc/gcc/fortran/trans-intrinsic.c
    branches/gupc/gcc/function.c
    branches/gupc/gcc/gcov-io.c
    branches/gupc/gcc/gcse.c
    branches/gupc/gcc/genhooks.c
    branches/gupc/gcc/gimple-low.c
    branches/gupc/gcc/go/ChangeLog
    branches/gupc/gcc/go/Make-lang.in
    branches/gupc/gcc/go/go-gcc.cc
    branches/gupc/gcc/go/gofrontend/backend.h
    branches/gupc/gcc/go/gofrontend/expressions.cc
    branches/gupc/gcc/go/gofrontend/gogo-tree.cc
    branches/gupc/gcc/go/gofrontend/gogo.cc
    branches/gupc/gcc/go/gofrontend/gogo.h
    branches/gupc/gcc/go/gofrontend/statements.cc
    branches/gupc/gcc/go/gofrontend/statements.h
    branches/gupc/gcc/haifa-sched.c
    branches/gupc/gcc/ifcvt.c
    branches/gupc/gcc/ipa-inline.c
    branches/gupc/gcc/lto-cgraph.c
    branches/gupc/gcc/objc/ChangeLog
    branches/gupc/gcc/objc/Make-lang.in
    branches/gupc/gcc/objc/objc-act.c
    branches/gupc/gcc/po/ChangeLog
    branches/gupc/gcc/po/de.po
    branches/gupc/gcc/profile.c
    branches/gupc/gcc/stor-layout.c
    branches/gupc/gcc/system.h
    branches/gupc/gcc/target.def
    branches/gupc/gcc/target.h
    branches/gupc/gcc/targhooks.c
    branches/gupc/gcc/targhooks.h
    branches/gupc/gcc/testsuite/ChangeLog
    branches/gupc/gcc/testsuite/g++.dg/cpp0x/noexcept02.C
    branches/gupc/gcc/testsuite/gcc.dg/lto/20090210_0.c
    branches/gupc/gcc/testsuite/gcc.dg/mtune.c
    branches/gupc/gcc/testsuite/gcc.dg/torture/pr47917.c
    branches/gupc/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c
    branches/gupc/gcc/testsuite/gcc.target/i386/asm-6.c
    branches/gupc/gcc/testsuite/gfortran.dg/coarray_13.f90
    branches/gupc/gcc/testsuite/lib/scanasm.exp
    branches/gupc/gcc/tree-cfg.c
    branches/gupc/gcc/tree-inline.c
    branches/gupc/gcc/tree-ssa-threadupdate.c
    branches/gupc/libgfortran/ChangeLog
    branches/gupc/libgfortran/caf/mpi.c
    branches/gupc/libgo/MERGE
    branches/gupc/libgo/Makefile.am
    branches/gupc/libgo/Makefile.in
    branches/gupc/libgo/go/archive/tar/reader.go
    branches/gupc/libgo/go/archive/tar/reader_test.go
    branches/gupc/libgo/go/archive/zip/reader.go
    branches/gupc/libgo/go/bufio/bufio.go
    branches/gupc/libgo/go/compress/lzw/writer_test.go
    branches/gupc/libgo/go/compress/zlib/writer_test.go
    branches/gupc/libgo/go/crypto/ecdsa/ecdsa.go
    branches/gupc/libgo/go/crypto/rand/rand_unix.go
    branches/gupc/libgo/go/crypto/rsa/pkcs1v15.go
    branches/gupc/libgo/go/crypto/rsa/rsa.go
    branches/gupc/libgo/go/crypto/rsa/rsa_test.go
    branches/gupc/libgo/go/crypto/tls/generate_cert.go
    branches/gupc/libgo/go/crypto/tls/tls.go
    branches/gupc/libgo/go/crypto/x509/x509.go
    branches/gupc/libgo/go/crypto/x509/x509_test.go
    branches/gupc/libgo/go/debug/elf/file.go
    branches/gupc/libgo/go/debug/macho/file.go
    branches/gupc/libgo/go/debug/pe/file.go
    branches/gupc/libgo/go/debug/proc/proc_linux.go
    branches/gupc/libgo/go/exec/exec.go
    branches/gupc/libgo/go/exp/draw/x11/auth.go
    branches/gupc/libgo/go/exp/ogle/cmd.go
    branches/gupc/libgo/go/fmt/fmt_test.go
    branches/gupc/libgo/go/fmt/format.go
    branches/gupc/libgo/go/fmt/print.go
    branches/gupc/libgo/go/go/parser/interface.go
    branches/gupc/libgo/go/go/parser/parser.go
    branches/gupc/libgo/go/html/parse_test.go
    branches/gupc/libgo/go/http/fs.go
    branches/gupc/libgo/go/http/fs_test.go
    branches/gupc/libgo/go/http/httptest/server.go
    branches/gupc/libgo/go/http/response_test.go
    branches/gupc/libgo/go/http/serve_test.go
    branches/gupc/libgo/go/http/transfer.go
    branches/gupc/libgo/go/http/transport.go
    branches/gupc/libgo/go/http/transport_test.go
    branches/gupc/libgo/go/http/url.go
    branches/gupc/libgo/go/http/url_test.go
    branches/gupc/libgo/go/image/decode_test.go
    branches/gupc/libgo/go/image/png/reader_test.go
    branches/gupc/libgo/go/io/ioutil/ioutil.go
    branches/gupc/libgo/go/io/ioutil/tempfile.go
    branches/gupc/libgo/go/log/log.go
    branches/gupc/libgo/go/log/log_test.go
    branches/gupc/libgo/go/mime/type.go
    branches/gupc/libgo/go/net/hosts.go
    branches/gupc/libgo/go/net/parse.go
    branches/gupc/libgo/go/net/parse_test.go
    branches/gupc/libgo/go/net/resolv_windows.go
    branches/gupc/libgo/go/os/error.go
    branches/gupc/libgo/go/os/exec.go
    branches/gupc/libgo/go/os/file.go
    branches/gupc/libgo/go/os/file_unix.go
    branches/gupc/libgo/go/os/getwd.go
    branches/gupc/libgo/go/os/inotify/inotify_linux_test.go
    branches/gupc/libgo/go/os/os_test.go
    branches/gupc/libgo/go/os/path.go
    branches/gupc/libgo/go/os/path_test.go
    branches/gupc/libgo/go/os/proc.go
    branches/gupc/libgo/go/os/sys_linux.go
    branches/gupc/libgo/go/os/time.go
    branches/gupc/libgo/go/path/filepath/match.go
    branches/gupc/libgo/go/path/filepath/match_test.go
    branches/gupc/libgo/go/path/filepath/path.go
    branches/gupc/libgo/go/path/filepath/path_test.go
    branches/gupc/libgo/go/path/filepath/path_unix.go
    branches/gupc/libgo/go/scanner/scanner.go
    branches/gupc/libgo/go/scanner/scanner_test.go
    branches/gupc/libgo/go/strconv/fp_test.go
    branches/gupc/libgo/go/testing/testing.go
    branches/gupc/libgo/mksysinfo.sh
    branches/gupc/libgo/syscalls/syscall.go
    branches/gupc/libgo/syscalls/syscall_unix.go
    branches/gupc/libgo/syscalls/sysfile_largefile.go
    branches/gupc/libgo/syscalls/sysfile_regfile.go
    branches/gupc/libgo/testsuite/gotest
    branches/gupc/libjava/classpath/   (props changed)
    branches/gupc/libstdc++-v3/ChangeLog
    branches/gupc/libstdc++-v3/include/ext/algorithm
    branches/gupc/libstdc++-v3/include/ext/numeric
    branches/gupc/lto-plugin/ChangeLog
    branches/gupc/lto-plugin/lto-plugin.c

Propchange: branches/gupc/
            ('svn:mergeinfo' modified)

Propchange: branches/gupc/libjava/classpath/
            ('svn:mergeinfo' modified)