Bug 20933 - [4.1 Regression] gcc can no longer bootstrap itself
Summary: [4.1 Regression] gcc can no longer bootstrap itself
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.1.0
Assignee: Diego Novillo
URL:
Keywords: build, ice-on-valid-code, wrong-code
Depends on:
Blocks:
 
Reported: 2005-04-10 20:35 UTC by Thomas Koenig
Modified: 2005-04-15 19:28 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-04-11 15:07:44


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Koenig 2005-04-10 20:35:59 UTC
I just had a bootstrap failure on i686-pc-linux-gnu with
CVS mainline of a few minutes ago.

I ran (in an empty directory):

$ ../gcc-4.1/configure --prefix=$HOME --enable-languages=c,f95
$ make bootstrap

...
m -f include/limits.h
cp xlimits.h include/limits.h
chmod a+r include/limits.h
rm -f include/README
cp ../../gcc-4.1/gcc/../fixincludes/README-fixinc include/README
chmod a+r include/README
echo timestamp > stmp-int-hdrs
objext='.o' \
LIB1ASMFUNCS='' \
LIB2FUNCS_ST='_eprintf __gcc_bcmp' \
LIBGCOV='_gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta _gcov_fork
_gcov_execl _gcov_execlp _gcov_execle _gcov_execv _gcov_execvp _gcov_execve' \
LIB2ADD='' \
LIB2ADD_ST='' \
LIB2ADDEH='../../gcc-4.1/gcc/unwind-dw2.c
../../gcc-4.1/gcc/unwind-dw2-fde-glibc.c ../../gcc-4.1/gcc/unwind-sjlj.c
../../gcc-4.1/gcc/gthr-gnat.c ../../gcc-4.1/gcc/unwind-c.c' \
LIB2ADDEHSTATIC='../../gcc-4.1/gcc/unwind-dw2.c
../../gcc-4.1/gcc/unwind-dw2-fde-glibc.c ../../gcc-4.1/gcc/unwind-sjlj.c
../../gcc-4.1/gcc/gthr-gnat.c ../../gcc-4.1/gcc/unwind-c.c' \
LIB2ADDEHSHARED='../../gcc-4.1/gcc/unwind-dw2.c
../../gcc-4.1/gcc/unwind-dw2-fde-glibc.c ../../gcc-4.1/gcc/unwind-sjlj.c
../../gcc-4.1/gcc/gthr-gnat.c ../../gcc-4.1/gcc/unwind-c.c' \
LIB2ADDEHDEP='unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c' \
LIBUNWIND='' \
LIBUNWINDDEP='' \
SHLIBUNWIND_LINK='' \
SHLIBUNWIND_INSTALL='' \
FPBIT='' \
FPBIT_FUNCS='_pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf _fpcmp_parts_sf
_compare_sf _eq_sf _ne_sf _gt_sf _ge_sf _lt_sf _le_sf _unord_sf _si_to_sf
_sf_to_si_negate_sf _make_sf _sf_to_df _sf_to_tf _thenan_sf _sf_to_usi _usi_to_sf' \
LIB2_DIVMOD_FUNCS='_divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4' \
DPBIT='' \
DPBIT_FUNCS='_pack_df _unpack_df _addsub_df _mul_df _div_df _fpcmp_parts_df
_compare_df _eq_df _ne_df _gt_df _ge_df _lt_df _le_df _unord_df _si_to_df
_df_to_si_negate_df _make_df _df_to_sf _df_to_tf _thenan_df _df_to_usi _usi_to_df' \
TPBIT='' \
TPBIT_FUNCS='_pack_tf _unpack_tf _addsub_tf _mul_tf _div_tf _fpcmp_parts_tf
_compare_tf _eq_tf _ne_tf _gt_tf _ge_tf _lt_tf _le_tf _unord_tf _si_to_tf
_tf_to_si_negate_tf _make_tf _tf_to_df _tf_to_sf _thenan_tf _tf_to_usi _usi_to_tf' \
MULTILIBS=` ./xgcc -B./ -B/home/ig25/i686-pc-linux-gnu/bin/ -isystem
/home/ig25/i686-pc-linux-gnu/include -isystem
/home/ig25/i686-pc-linux-gnu/sys-include -L/home/ig25/gcc-4.1-bin/gcc/../ld
--print-multi-lib` \
EXTRA_MULTILIB_PARTS='' \
SHLIB_LINK=' ./xgcc -B./ -B/home/ig25/i686-pc-linux-gnu/bin/ -isystem
/home/ig25/i686-pc-linux-gnu/include -isystem
/home/ig25/i686-pc-linux-gnu/sys-include -L/home/ig25/gcc-4.1-bin/gcc/../ld -O2
 -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -shared -nodefaultlibs
-Wl,--soname=@shlib_base_name@.so.1 -Wl,--version-script=@shlib_map_file@ -o
@multilib_dir@/@shlib_base_name@.so.1.tmp @multilib_flags@ @shlib_objs@ -lc &&
rm -f @multilib_dir@/@shlib_base_name@.so && if [ -f
@multilib_dir@/@shlib_base_name@.so.1 ]; then mv -f
@multilib_dir@/@shlib_base_name@.so.1
@multilib_dir@/@shlib_base_name@.so.1.backup; else true; fi && mv
@multilib_dir@/@shlib_base_name@.so.1.tmp @multilib_dir@/@shlib_base_name@.so.1
&& ln -s @shlib_base_name@.so.1 @multilib_dir@/@shlib_base_name@.so' \
SHLIB_INSTALL='$(mkinstalldirs) $(DESTDIR)$(slibdir)@shlib_slibdir_qual@;
/usr/bin/install -c -m 644 @multilib_dir@/@shlib_base_name@.so.1
$(DESTDIR)$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so.1; rm -f
$(DESTDIR)$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so; ln -s
@shlib_base_name@.so.1
$(DESTDIR)$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so' \
SHLIB_EXT='.so' \
SHLIB_MULTILIB='' \
SHLIB_MKMAP='../../gcc-4.1/gcc/mkmap-symver.awk' \
SHLIB_MKMAP_OPTS='' \
SHLIB_MAPFILES='../../gcc-4.1/gcc/libgcc-std.ver
../../gcc-4.1/gcc/config/libgcc-glibc.ver' \
SHLIB_NM_FLAGS='-pg' \
MULTILIB_OSDIRNAMES='' \
ASM_HIDDEN_OP='' \
mkinstalldirs='/bin/sh ../../gcc-4.1/gcc/../mkinstalldirs' \
  /bin/sh mklibgcc > tmp-libgcc.mk
mv tmp-libgcc.mk libgcc.mk
TARGET_CPU_DEFAULT="" \
HEADERS="ansidecl.h" DEFINES="" \
/bin/sh ../../gcc-4.1/gcc/mkconfig.sh tconfig.h
./xgcc -B./ -B/home/ig25/i686-pc-linux-gnu/bin/ -isystem
/home/ig25/i686-pc-linux-gnu/include -isystem
/home/ig25/i686-pc-linux-gnu/sys-include -L/home/ig25/gcc-4.1-bin/gcc/../ld -O2
-DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes-Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -I. -I. -I../../gcc-4.1/gcc
-I../../gcc-4.1/gcc/. -I../../gcc-4.1/gcc/../include
-I../../gcc-4.1/gcc/../libcpp/include   -g0 -finhibit-size-directive
-fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss
-fno-unit-at-a-time -fno-omit-frame-pointer \
   -c ../../gcc-4.1/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
make[2]: *** [crtbegin.o] Aborted
make[2]: Leaving directory `/home/ig25/gcc-4.1-bin/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/home/ig25/gcc-4.1-bin/gcc'
make: *** [bootstrap] Error 2

The compiler used for bootstrapping was
$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1/configure --prefix=/home/ig25 --enable-languages=c,f95
Thread model: posix
gcc version 4.1.0 20050409 (experimental)

I then repeated the bootstrap with gcc version 3.3.5 (Debian 1:3.3.5-12),
the problem didn't occur (bootstrap is running fine in stage3 at
the moment).
Comment 1 Andrew Pinski 2005-04-10 20:41:56 UTC
I saw the same problem last night with my auto tester which means we are creating wrong code 
somewhere.
Comment 2 Andrew Pinski 2005-04-11 06:00:30 UTC
Most likely libiberty (the pex* functions) is being miscompiled.
Comment 3 Andrew Pinski 2005-04-11 14:43:00 UTC
I think this was caused by:
2005-04-08  Diego Novillo  <dnovillo@redhat.com>
        
        Merge from tree-cleanup-branch: VRP, store CCP, store
            copy-prop, incremental SSA updating of FUD chains and
            newly exposed symbols.
Comment 4 Andrew Pinski 2005-04-11 14:50:15 UTC
Actually if anything is miscompile it would be make_temp_file.
Comment 5 Diego Novillo 2005-04-11 17:41:44 UTC
Testing fix.
Comment 6 CVS Commits 2005-04-11 22:07:07 UTC
Subject: Bug 20933

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	dnovillo@gcc.gnu.org	2005-04-11 22:06:47

Modified files:
	gcc            : ChangeLog tree-ssa-alias.c tree-ssa.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg/tree-ssa: pr20933.c 

Log message:
	PR tree-optimization/20933
	* tree-ssa-alias.c (compute_flow_insensitive_aliasing): Move
	logic to reject aliases between read-only and writable
	variables ...
	(may_alias_p): ... here.
	(get_tmt_for): Do not associate read-only tags to pointers
	whose pointed-to type is not read-only.
	* tree-ssa.c (verify_ssa): Check that memory stores have at
	least one V_MAY_DEF or V_MUST_DEF.
	
	testsuite/ChangeLog
	
	PR tree-optimization/20933
	* gcc.dg/tree-ssa/pr20933.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8239&r2=2.8240
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-alias.c.diff?cvsroot=gcc&r1=2.84&r2=2.85
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa.c.diff?cvsroot=gcc&r1=2.87&r2=2.88
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5327&r2=1.5328
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr20933.c.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 7 Diego Novillo 2005-04-11 23:59:02 UTC
Fixed.  http://gcc.gnu.org/ml/gcc-patches/2005-04/msg01227.html