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)
freorder-blocks-and-partition is useless without profiling info.
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.
And, if profiling data is required, then we should issue an error saying that, not fall over.
Testing a fix.
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
Fixed.
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