This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] SH: Bootstrap failure
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: gcc-patches at gcc dot gnu dot org
- Cc: joern dot rennecke at st dot com, aoliva at redhat dot com
- Date: Tue, 21 Jun 2005 19:18:35 +0900 (JST)
- Subject: [patch] SH: Bootstrap failure
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?
Regards,
kaz
--
2005-06-21 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.c (sh_output_mi_thunk): Init bb info if needed.
diff -uprN ORIG/gcc/gcc/config/sh/sh.c LOCAL/gcc/gcc/config/sh/sh.c
--- ORIG/gcc/gcc/config/sh/sh.c 2005-06-03 09:31:18.000000000 +0900
+++ LOCAL/gcc/gcc/config/sh/sh.c 2005-06-19 20:18:42.000000000 +0900
@@ -9592,6 +9592,8 @@ sh_output_mi_thunk (FILE *file, tree thu
if (optimize > 0 && flag_schedule_insns_after_reload)
{
+ basic_block bb;
+
/* Initialize the bitmap obstacks. */
bitmap_obstack_initialize (NULL);
bitmap_obstack_initialize (®_obstack);
@@ -9599,6 +9601,14 @@ sh_output_mi_thunk (FILE *file, tree thu
init_flow ();
rtl_register_cfg_hooks ();
find_basic_blocks (insns);
+ FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
+ {
+ if (! bb->il.rtl)
+ {
+ init_rtl_bb_info (bb);
+ bb->flags |= BB_RTL;
+ }
+ }
life_analysis (dump_file, PROP_FINAL);
split_all_insns (1);