Bug 23857 - [4.1 Regression] ICE: verify_flow_info failed - too many outgoing branch edges
Summary: [4.1 Regression] ICE: verify_flow_info failed - too many outgoing branch edges
Status: RESOLVED DUPLICATE of bug 24232
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-09-13 13:23 UTC by Michael Cieslinski
Modified: 2005-10-15 17:29 UTC (History)
7 users (show)

See Also:
Host:
Target: x86_64-*-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-10-13 16:01:09


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Cieslinski 2005-09-13 13:23:16 UTC
When I compile the small program below using the actual snapshot 
(20050909) I get an ICE.

last working snapshot is   gcc-4.1-20050723
first failing snapshot is  gcc-4.1-20050730

Michael Cieslinski


<file tc.cpp>

extern int *F2 (void) __attribute__ ((__const__));

struct S1{};

struct S3;

struct S2
{
    int F1 () { (*F2 ()) = 62; }
};

struct S4
{
    S4(S1 &s1, S2 &s2, S3*& s3, int &i);

    S1 &P1;
    S2 &P2;
    int &P3;
    int &P4;
    S3 *&P5;
    S3 *P6;
};

S4::S4 (S1 &s1, S2 &s2, S3*& s3, int &i)
:   P1(s1), P2(s2), P3(i), P4(i), P5(s3), P6()
{
  while (this->P4 != 0)
  this->P2.F1 ();
}


g++41o -O2 -fsched-stalled-insns=5 -fsched2-use-superblocks -funroll-all-loops -
S tc.cpp
tc.cpp: In constructor 'S4::S4(S1&, S2&, S3*&, int&)':
tc.cpp:29: error: too many outgoing branch edges from bb 8
tc.cpp:29: error: too many outgoing branch edges from bb 7
tc.cpp:29: error: too many outgoing branch edges from bb 6
tc.cpp:29: error: too many outgoing branch edges from bb 5
tc.cpp:29: error: too many outgoing branch edges from bb 4
tc.cpp:29: internal compiler error: verify_flow_info failed
Please submit a full bug report, with preprocessed source if appropriate.


g++41o -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.1-20050909/configure --prefix=/usr/local/gcc41o --
program-suffix=41o --with-arch=opteron --enable-languages=c,c++ --enable-
checking
Thread model: posix
gcc version 4.1.0 20050909 (experimental)
Comment 1 Andrew Pinski 2005-09-13 14:20:39 UTC
Confirmed.
Comment 2 Janis Johnson 2005-09-16 16:19:11 UTC
A regression hunt using a cross compiler identified this patch from steven:

  http://gcc.gnu.org/ml/gcc-cvs/2005-07/msg00960.html
Comment 3 Steven Bosscher 2005-09-16 16:53:05 UTC
Huh, I better look at this bug then, eh? 
Comment 4 Steven Bosscher 2005-09-16 17:01:16 UTC
Not being a C++ fan, I reduced it to this C test case: 
================================== 
extern int *F2 (void) __attribute__ ((__const__)); 
 
void 
S4 (int *i) 
{ 
  int *D2171; 
 
  D2171 = F2 (); 
 
L0: 
  *D2171 = 62; 
  if (*i != 0) goto L0; else goto L2; 
 
L2: 
  return; 
} 
================================== 
 
$ ./cc1 -O2 -fsched-stalled-insns=5 -fsched2-use-superblocks 
-funroll-all-loops t.c -fdump-tree-vars -fno-tree-ch 
 S4 
Analyzing compilation unitPerforming intraprocedural optimizations 
Assembling functions: 
 S4 
t.c: In function 'S4': 
t.c:16: error: too many outgoing branch edges from bb 7 
t.c:16: error: too many outgoing branch edges from bb 6 
t.c:16: error: too many outgoing branch edges from bb 5 
t.c:16: error: too many outgoing branch edges from bb 4 
t.c:16: error: too many outgoing branch edges from bb 3 
t.c:16: internal compiler error: verify_flow_info failed 
 
 
Comment 5 Steven Bosscher 2005-10-07 21:33:02 UTC
This is somehow a bug in sched-ebb, but I can't figure out where...
Comment 6 Andrew Pinski 2005-10-13 16:01:09 UTC
Reduced a little further without any labels or gotos:
extern int *F2 (void) __attribute__ ((__const__));
void
S4 (int *i)
{
  int *D2171;
  D2171 = F2 ();
  do 
    *D2171 = 62;
  while (*i !=0);
}
Comment 7 Steven Bosscher 2005-10-15 17:25:01 UTC
This patch from Jim Wilson makes the ICE go away for me:
http://gcc.gnu.org/ml/gcc-patches/2005-10/msg00886.html
Comment 8 Steven Bosscher 2005-10-15 17:25:52 UTC
reopening...
Comment 9 Steven Bosscher 2005-10-15 17:29:19 UTC
...to fix a mouse click on the wrong radio button :-/

*** This bug has been marked as a duplicate of 24232 ***