Bug 33648 - [4.3 Regression] ICE in verify_flow_info for -fmodulo-sched -freorder-blocks-and-partition
Summary: [4.3 Regression] ICE in verify_flow_info for -fmodulo-sched -freorder-blocks-...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.3.0
: P1 normal
Target Milestone: 4.3.0
Assignee: Jakub Jelinek
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2007-10-03 20:45 UTC by Janis Johnson
Modified: 2007-11-01 23:28 UTC (History)
3 users (show)

See Also:
Host:
Target: powerpc64-unknown-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-11-01 19:39:48


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janis Johnson 2007-10-03 20:45:19 UTC
Most benchmarks in SPEC CPU2000 fail to compile with an ICE when compiled with "-O2 -fmodulo-sched -freorder-blocks-and-partition" for powerpc* and s390* targets.  Compiling the following minimized testcase:

unsigned res;
void
foo (unsigned code, int len)
{
  int i;
  for (i = 0; i < len; i++)
      res |= code & 1;
}

gives the output:

bug.c: In function ‘foo’:
bug.c:8: error: fallthru edge crosses section boundary (bb 9)
bug.c:8: error: fallthru edge crosses section boundary (bb 7)
bug.c:8: error: fallthru edge crosses section boundary (bb 13)
bug.c:8: error: fallthru edge crosses section boundary (bb 12)
bug.c:8: error: fallthru edge crosses section boundary (bb 3)
bug.c:8: internal compiler error: verify_flow_info failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

The failure starts with this patch:

    http://gcc.gnu.org/viewcvs?view=rev&rev=127293

    r127293 | revitale | 2007-08-08 12:21:37 +0000 (Wed, 08 Aug 2007)
Comment 1 Andrew Pinski 2007-10-04 23:19:34 UTC
freorder-blocks-and-partition is useless without profiling info.
Comment 2 Janis Johnson 2007-10-06 00:11:55 UTC
In response to comment #1, the GCC Manual doesn't say anything about -freorder-blocks-and-partition needing profile feedback although it does say that for -freorder-functions.
Comment 3 Mark Mitchell 2007-10-10 18:10:08 UTC
And, if profiling data is required, then we should issue an error saying that, not fall over.
Comment 4 Jakub Jelinek 2007-11-01 19:39:48 UTC
Testing a fix.
Comment 5 Jakub Jelinek 2007-11-01 23:27:34 UTC
Subject: Bug 33648

Author: jakub
Date: Thu Nov  1 23:27:23 2007
New Revision: 129837

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129837
Log:
	PR rtl-optimization/33648
	* cfgrtl.c (cfg_layout_split_edge): Initialize BB_PARTITION of
	the newly created basic block.

	* gcc.dg/pr33648.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr33648.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgrtl.c
    trunk/gcc/testsuite/ChangeLog

Comment 6 Jakub Jelinek 2007-11-01 23:28:14 UTC
Fixed.
Comment 7 Jakub Jelinek 2007-11-05 21:55:44 UTC
Subject: Bug 33648

Author: jakub
Date: Mon Nov  5 21:55:37 2007
New Revision: 129909

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129909
Log:
	PR rtl-optimization/33648
	* gcc.dg/pr33648.c: New test.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/pr33648.c