Bug 49190 - [4.7 Regression] Bootstrap failure at revision 174286 on several platforms
[4.7 Regression] Bootstrap failure at revision 174286 on several platforms
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: bootstrap
4.7.0
: P3 normal
: 4.7.0
Assigned To: Not yet assigned to anyone
:
: 49208 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-27 12:39 UTC by Dominique d'Humieres
Modified: 2011-05-31 07:41 UTC (History)
7 users (show)

See Also:
Host:
Target: x86_64-apple-darwin10, sparc-sun-solaris2*,x86_64-unknown-freebsd8.2
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-05-27 13:16:31


Attachments
preprocessed file (98.95 KB, text/plain)
2011-05-27 12:39 UTC, Dominique d'Humieres
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique d'Humieres 2011-05-27 12:39:00 UTC
Created attachment 24370 [details]
preprocessed file

x86_64-apple-darwin10 fails to bootstrap at revision 174286 with:

...
libtool: compile:  /opt/gcc/build_w/./gcc/xgcc -B/opt/gcc/build_w/./gcc/ -B/opt/gcc/gcc4.7w/x86_64-apple-darwin10.7.0/bin/ -B/opt/gcc/gcc4.7w/x86_64-apple-darwin10.7.0/lib/ -isystem /opt/gcc/gcc4.7w/x86_64-apple-darwin10.7.0/include -isystem /opt/gcc/gcc4.7w/x86_64-apple-darwin10.7.0/sys-include -DHAVE_CONFIG_H -I. -I../../../work/libgfortran -iquote../../../work/libgfortran/io -I../../../work/libgfortran/../gcc -I../../../work/libgfortran/../gcc/config -I../../../work/libgfortran/../libquadmath -I../.././gcc -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -fcx-fortran-rules -ffunction-sections -fdata-sections -g -O2 -MT fmain.lo -MD -MP -MF .deps/fmain.Tpo -c ../../../work/libgfortran/fmain.c  -fno-common -DPIC -o .libs/fmain.o
In file included from ../../../work/libgfortran/libgfortran.h:53:0,
                 from ../../../work/libgfortran/fmain.c:4:
../../../work/libgfortran/../libquadmath/quadmath_weak.h:39:1: internal compiler error: tree check: expected tree that contains 'common' structure, have 'identifier_node' in assemble_alias, at varasm.c:5789

Configured with: ../work/configure --prefix=/opt/gcc/gcc4.7w --enable-languages=c,c++,fortran,objc,obj-c++,java,lto --with-gmp=/opt/sw64 --with-libiconv-prefix=/opt/sw64 --with-system-zlib --with-cloog=/opt/sw64 --enable-cloog-backend=isl --enable-lto

I attach the preprocessed file produced with

/opt/gcc/build_w/gcc/xgcc -B/opt/gcc/build_w/gcc/ -DHAVE_CONFIG_H -I. -I../../../work/libgfortran -iquote../../../work/libgfortran/io -I../../../work/gcc -I../../../work/gcc/config -I../../../work/libquadmath -I../../gcc -c ../../../work/libgfortran/fmain.c -save-temps

which yields

[macbook] x86_64-apple-darwin10.7.0/libgfortran% /opt/gcc/build_w/gcc/cc1 fmain.i                                                                      __sputc __inline_isinff __inline_isinfd __inline_isinf __inline_isfinitef __inline_isfinited __inline_isfinite __inline_isnanf __inline_isnand __inline_isnan __inline_signbitf __inline_signbitd __inline_signbit __inline_isnormalf __inline_isnormald __inline_isnormal _OSSwapInt16 _OSSwapInt32 _OSSwapInt64 cimagq crealq conjq
In file included from ../../../work/libgfortran/libgfortran.h:53:0,
                 from ../../../work/libgfortran/fmain.c:4:
../../../work/libquadmath/quadmath_weak.h:39:1: internal compiler error: tree check: expected tree that contains 'common' structure, have 'identifier_node' in assemble_alias, at varasm.c:5789

Revision 174285 is OK (its cc1 compiles fmain.i without any error).

Note that I have bootstrapped revision 174295 with

Configured with: ../p_work/configure --prefix=/opt/gcc/gcc4.7p --enable-languages=c,c++,lto,fortran --with-gmp=/opt/sw64 --with-libiconv-prefix=/opt/sw64 --with-system-zlib --enable-checking=release --with-cloog=/opt/sw64 --enable-cloog-backend=isl --enable-lto
Comment 1 Rainer Orth 2011-05-27 13:16:31 UTC
Same problem on Solaris 11/SPARC.
Comment 2 Dominique d'Humieres 2011-05-27 17:51:07 UTC
I have bootstrapped revision 174339 after reverting revision 174286.
Comment 3 Nathan Froyd 2011-05-27 17:57:44 UTC
Ugh.  I do not have time to deal with this problem at the moment.

But I don't understand how ASM_OUTPUT_WEAKREF isn't defined at that point.  We have a perfectly fine default definition in defaults.h.
Comment 4 Jack Howarth 2011-05-27 18:29:53 UTC
(In reply to comment #3)
> Ugh.  I do not have time to deal with this problem at the moment.
> 
> But I don't understand how ASM_OUTPUT_WEAKREF isn't defined at that point.  We
> have a perfectly fine default definition in defaults.h.

Perhaps because x86_64-apple-darwin has...

[MacPro:gcc47-4.7.0-1000/darwin_objdir/gcc] root# grep HAVE_GAS_WEAKREF *
auto-host.h:/* #undef HAVE_GAS_WEAKREF */

whereas linux has...

auto-host.h:#define HAVE_GAS_WEAKREF 1
Comment 5 Nathan Froyd 2011-05-27 18:57:23 UTC
That's what I get for not actually *looking* at the definition.

The only quick non-reverting way I see of fixing this is to use TREE_TYPE instead of TREE_CHAIN...which is gross.  CC'ing Honza to see if he has good ideas.
Comment 6 Dominique d'Humieres 2011-05-28 12:16:38 UTC
PR49208 is likely a duplicate of this PR.
Comment 7 Richard Biener 2011-05-28 12:54:25 UTC
*** Bug 49208 has been marked as a duplicate of this bug. ***
Comment 8 Dominique d'Humieres 2011-05-28 20:42:16 UTC
This also caused all the ICE on regress (ppc-darwin9, see http://gcc.gnu.org/ml/gcc-testresults/2011-05/msg03217.html ).
Comment 9 Gerald Pfeifer 2011-05-28 20:46:20 UTC
This also kills the bootstrap on amd64-unknown-freebsd8.2 (though not i386-...):

In file included from ../.././gcc/gthr-default.h:1:0,
                 from /scratch/tmp/gerald/gcc-HEAD/libgcc/../gcc/gthr.h:160,
                 from /scratch/tmp/gerald/gcc-HEAD/libgcc/../gcc/unwind-dw2.c:37
:
/scratch/tmp/gerald/gcc-HEAD/libgcc/../gcc/gthr-posix.h:118:1: internal compiler
 error: tree check: expected tree that contains 'common' structure, have 'identi
fier_node' in assemble_alias, at varasm.c:5789


Might be best to revert the patch for now?
Comment 10 Dominique d'Humieres 2011-05-28 22:29:00 UTC
> Might be best to revert the patch for now?

Especially in the light of comment #3:

> Ugh.  I do not have time to deal with this problem at the moment.

Anyway I did not wait and I have done it on my platforms (x86_64-apple-darwin10 and powerpc-apple-darwin9).
Comment 11 Jack Howarth 2011-05-29 15:12:50 UTC
It is strange that regress is still able to bootstrap powerpc-apple-darwin9 with r174286 present. The powerpc-apple-darwin9 target also has...

auto-host.h:/* #undef HAVE_GAS_WEAKREF */

but it doesn't seem to trigger the same bootstrap issues as on intel darwin.
Comment 12 Dominique d'Humieres 2011-05-29 15:53:04 UTC
> It is strange that regress is still able to bootstrap powerpc-apple-darwin9
> with r174286 present. The powerpc-apple-darwin9 target also has...
>
> auto-host.h:/* #undef HAVE_GAS_WEAKREF */
>
> but it doesn't seem to trigger the same bootstrap issues as on intel darwin.

From the audit trail, bootstrap fails on several platforms (four so far) after r174286 (I have changes the summary accordingly), but in different places. I also as able to bootstrap my G5 without reverting r174286, however I have seen the new failures shown in the regress reports. These failures disappeared after having a new bootstrap with r174286 reverted.
Comment 13 John David Anglin 2011-05-29 21:34:44 UTC
Also seen on i686-apple-darwin9.
Comment 14 Nathan Froyd 2011-05-30 16:42:12 UTC
Author: froydnj
Date: Mon May 30 16:42:05 2011
New Revision: 174445

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174445
Log:
fix PR bootstrap/4910
gcc/
	PR bootstrap/49190

	Revert:
	2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>

	* tree.h (struct tree_identifier): Inherit from tree_typed, not
	tree_common.
	(HT_IDENT_TO_GCC_IDENT): Adjust for said change.
	* tree.c (initialize_tree_contains_struct): Mark TS_IDENTIFIER as
	TS_BASE instead of TS_COMMON.
	* varasm.c (assemble_name): Remove assert.

gcc/c-family/
	PR bootstrap/49190

	Revert:
	2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>

	* c-common.h (struct c_common_identifier): Inherit from tree_typed,
	not tree_common.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.h
    trunk/gcc/tree.c
    trunk/gcc/tree.h
    trunk/gcc/varasm.c
Comment 15 Nathan Froyd 2011-05-30 16:43:01 UTC
I've reverted the offending commit.  If somebody could confirm that the failures are gone, this PR can be closed.
Comment 16 Jack Howarth 2011-05-30 18:52:18 UTC
At r174446,  lto profiled bootstrap works fine on x86_64 darwin.
Comment 17 Gerald Pfeifer 2011-05-30 21:15:29 UTC
x86_64-unknown-freebsd8.2 is back in bootstrap land again.
Comment 18 dave 2011-05-31 00:03:14 UTC
Bootstrap restored on i686-apple-darwin9.

Dave
Comment 19 Dominique d'Humieres 2011-05-31 07:41:22 UTC
> I've reverted the offending commit.  If somebody could confirm that the
> failures are gone, this PR can be closed.

Regress is back to "normal". Closing as fixed.