This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] SH: Bootstrap failure
- From: Joern RENNECKE <joern dot rennecke at st dot com>
- To: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Cc: gcc-patches at gcc dot gnu dot org, aoliva at redhat dot com
- Date: Tue, 28 Jun 2005 15:15:17 +0100
- Subject: Re: [patch] SH: Bootstrap failure
- References: <20050621.191835.23009956.kkojima@rr.iij4u.or.jp>
Kaz Kojima wrote:
Hi,
Mainline fails to build libstdc++-v3 for sh4-unknown-linux-gnu with
gcc/libstdc++-v3/src/strstream.cc: In member function 'void std::strstream::_ZTv0_n12_NSt9strstreamD0Ev()':
gcc/libstdc++-v3/src/strstream.cc:415: internal compiler error: Segmentation fault
The segfault is caused with accessing null bb->il.rtl pointer in
life_analysis. The patch
http://gcc.gnu.org/ml/gcc-patches/2005-06/msg00978.html
requires explicit initializations of the new field bb->il.rtl.
The attached patch appears to do the minimal thing. Tested on
sh4-unknown-linux-gnu with bootstrap and "make -k check".
Ok for mainline?
I'm not sure if we need to do this extra initialization also for the
optimize && flag_delayed_branch case (I.e. if we compile with
-O2 -fno-schedule-insns-2) Even if we don't, this
selective initializing becomes ever more brittle as we add more
things that need to be initialized, all of which might become used
in more passes later on. I think we should make the extra
initializations - up to the "find_basic_blocks (insns);" - dependent
on "if (optimize)" only. Likewise for the entire clean-up code
(free_basic_block_vars is harmless and quick if there is nothing to clean
up). The extra initialization code before dbr_schedule can then go.