Bug 47044 - bootstrap comparison failure when -O2 defaults on -fgraphite-identity and --enable-build-with-cxx
Summary: bootstrap comparison failure when -O2 defaults on -fgraphite-identity and --e...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2010-12-22 19:08 UTC by Jack Howarth
Modified: 2011-02-02 15:54 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-01-28 10:36:30


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Howarth 2010-12-22 19:08:16 UTC
On x86_64-apple-darwin10 at r168176 with...

Index: gcc/opts.c
===================================================================
--- gcc/opts.c    (revision 168176)
+++ gcc/opts.c    (working copy)
@@ -458,6 +458,9 @@
     { OPT_LEVELS_1_PLUS, OPT_fcombine_stack_adjustments, NULL, 1 },

     /* -O2 optimizations.  */
+#ifdef HAVE_cloog
+    { OPT_LEVELS_2_PLUS, OPT_fgraphite_identity, NULL, 1 },
+#endif
     { OPT_LEVELS_2_PLUS, OPT_finline_small_functions, NULL, 1 },
     { OPT_LEVELS_2_PLUS, OPT_findirect_inlining, NULL, 1 },
     { OPT_LEVELS_2_PLUS, OPT_fpartial_inlining, NULL, 1 },

applied to default on -fgraphite-identity at -O2, a bootstrap comparison failure occurs...


Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1objplus-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
gcc/alias.o differs
gcc/attribs.o differs
gcc/bb-reorder.o differs
gcc/bitmap.o differs
gcc/bt-load.o differs
gcc/build/genattrtab.o differs
gcc/build/genautomata.o differs
gcc/build/genflags.o differs
gcc/build/gengenrtl.o differs
gcc/build/gengtype-lex.o differs
gcc/build/gengtype-state.o differs
...

This problem did not occur at r167670.
http://gcc.gnu.org/ml/gcc-testresults/2010-12/msg00852.html

../gcc-4.6-20101222/configure --prefix=/sw --prefix=/sw/lib/gcc4.6 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.6/info --enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/sw --with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.6 --enable-checking=yes --enable-cloog-backend=isl --enable-build-with-cxx
Comment 1 Jack Howarth 2010-12-22 19:53:23 UTC
The trigger appears to be the use of --enable-build-with-cxx with -O2 defaulted to -fgraphite-identity. Removing that configure option eliminates the bootstrap comparison failures.
Comment 2 Jack Howarth 2010-12-23 04:14:44 UTC
Same bootstrap comparison failure obtained with unpatched r168197 using...

make -j 8 BOOT_CFLAGS="-g -O2 -fgraphite-identity"

with --enable-build-with-cxx on x86_64-apple-darwin10.
Comment 3 Jack Howarth 2010-12-23 05:09:28 UTC
Same bootstrap comparison failure can be reproduced on x86_64 Fedora10 with...

../gcc/configure --with-gmp=/usr --with-mpfr=/usr --with-mpc=/usr --prefix=/home/howarth/dist --enable-languages=c,c++ --enable-checking=yes --enable-build-with-cxx
make -j 8 BOOT_CFLAGS="-g -O2 -fgraphite-identity"
Comment 4 Jack Howarth 2011-02-02 15:08:33 UTC
This issue appears to be resolved at r169520 with http://gcc.gnu.org/ml/gcc-patches/2011-02/msg00070.html (omitting the TODO_update_address_taken part) and http://gcc.gnu.org/ml/gcc-patches/2011-02/msg00095.html.
Comment 5 Sebastian Pop 2011-02-02 15:52:27 UTC
Author: spop
Date: Wed Feb  2 15:52:21 2011
New Revision: 169531

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169531
Log:
Fix PR40979 and PR47044: after LIM call copy_prop and DCE to clean up.

2011-02-02  Sebastian Pop  <sebastian.pop@amd.com>
	    Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/40979
	PR bootstrap/47044
	* passes.c (init_optimization_passes): After LIM call copy_prop
	and DCE to clean up.
	* tree-ssa-loop.c (pass_graphite_transforms): Add TODO_dump_func.

	* gcc.dg/graphite/graphite.exp (DEFAULT_VECTCFLAGS): Add -ffast-math.
	* gcc.dg/graphite/pr35356-2.c: Adjust pattern.
	* gfortran.dg/graphite/graphite.exp: Run vect_files conditionally to
	check_vect_support_and_set_flags.
	* gfortran.dg/graphite/vect-pr40979.f90: New.

Added:
    trunk/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/passes.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/graphite/graphite.exp
    trunk/gcc/testsuite/gcc.dg/graphite/pr35356-2.c
    trunk/gcc/testsuite/gfortran.dg/graphite/graphite.exp
    trunk/gcc/tree-ssa-loop.c
Comment 6 Sebastian Pop 2011-02-02 15:54:17 UTC
Fixed.