This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/42250] New: segfault in ipa-type-escape.c for several cpu2000 tests
- From: "janis at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Dec 2009 01:17:54 -0000
- Subject: [Bug tree-optimization/42250] New: segfault in ipa-type-escape.c for several cpu2000 tests
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
GCC trunk gets a segmentation fault when building SPEC CPU2000 tests 164.gzip,
175.vpr, 176.gcc, 197.parser, 252.eon, 253.perlbmk, and 177.mesa with "-O2
-fipa-type-escape" on powerpc-linux. That option is meant to be used with
-fipa-struct-reorg, which is meant to be used with -combine and
-fwhole-program, and the same segfault happens with that whole set of options.
The segfault always happens in the same place, verified by testing with this
patch:
-------------------------------------------------------------------------
Index: gcc/ipa-type-escape.c
===================================================================
--- gcc/ipa-type-escape.c (revision 154833)
+++ gcc/ipa-type-escape.c (working copy)
@@ -1663,6 +1663,7 @@ analyze_function (struct cgraph_node *fn
struct function *this_cfun = DECL_STRUCT_FUNCTION (decl);
basic_block this_block;
+ gcc_assert (this_cfun != NULL);
FOR_EACH_BB_FN (this_block, this_cfun)
{
gimple_stmt_iterator gsi;
-------------------------------------------------------------------------
The minimized test case is kind of large so I'll attach it.
The failure starts with this patch:
http://gcc.gnu.org/viewcvs?view=rev&rev=147294
r147294 | hubicka | 2009-05-08 19:19:51 +0000 (Fri, 08 May 2009)
--
Summary: segfault in ipa-type-escape.c for several cpu2000 tests
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janis at gcc dot gnu dot org
GCC target triplet: powerpc-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42250