This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/40102] New: [4.5 Regression] ICE: verify_cgraph_node


The following testcase triggers an ICE on trunk when compiled with "-O2":

================================================
bool foo0(int) { return true; }

bool foo1();

void foo2(bool);

template<typename T> inline void bar1(T f)
{
  if (f(0))
    foo1();
}

template<typename T> void bar2(T f)
{
  while (foo1())
  {
    foo2(foo1());
    if (foo1())
      bar1(f);
  }

  if (foo1())
    bar1(f);
}

void baz()
{
  bar2(foo0);
}
================================================

bug.cc:29: error: missing callgraph edge for call stmt:
retval.3_1 = foo0 (0);

void bar1(T) [with T = bool (*)(int)]/10(-1) [0x2a95725000]: (inline copy in
void bar2(T) [with T = bool (*)(int)]/2) (clone of void bar1(T) [with T = bool
(*)(int)]/6) availability:local 27 insns body local finalized inlinable
  called by: void bar2(T) [with T = bool (*)(int)]/2 (0.39 per call) (inlined)
(can throw external)
  calls: bool foo1()/4 (0.15 per call) (can throw external)
bug.cc:29: internal compiler error: verify_cgraph_node failed
Please submit a full bug report, [etc.]

This might be caused by the patch for PR40080.


-- 
           Summary: [4.5 Regression] ICE: verify_cgraph_node
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40102


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]