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/42110] New: [4.5 Regression] ICE with inlining


The following valid code snippet triggers an ICE on trunk
when compiled with "-O2":

===========================================================
bool foo();

struct A
{
  A* fooA() { if (foo()) foo(); return this; }

  virtual void barA(char);
};

template<int> struct B
{
  A *p, *q;

  void fooB(char c) { p->fooA()->barA(c); }
};

template<int N> inline void bar(B<N> b) { b.fooB(0); }

extern template void bar(B<0>);

void (*f)(B<0>) = bar;

void baz()
{
  B<0>().fooB(0);
}
===========================================================

bug.cc:26:1: error: inlined_to pointer set for noninline callers
bug.cc:26:1: error: multiple inline callers
A::fooA()/7(-1) @0xb7cea820 (inline copy in baz()/1) availability:available 17
time, 12 benefit 6 size, 3 benefit reachable body finalized inlinable
  called by: _ZN1BILi0EE4fooBEc.clone.0/5 (1.00 per call) (can throw external)
_ZN1BILi0EE4fooBEc.clone.0/6 (1.00 per call) (inlined) (can throw external) 
  calls: foo()/4 (1.00 per call) (can throw external) foo()/4 (0.39 per call)
(can throw external) 
bug.cc:26:1: internal compiler error: verify_cgraph_node failed
Please submit a full bug report, [etc.]

The regression was introduced between 2009-11-13 and 2009-11-17.


-- 
           Summary: [4.5 Regression] ICE with inlining
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, monitored
          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=42110


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