public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/42110]  New: [4.5 Regression] ICE with inlining
@ 2009-11-19 20:35 reichelt at gcc dot gnu dot org
  2009-11-19 20:36 ` [Bug middle-end/42110] " reichelt at gcc dot gnu dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-11-19 20:35 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-12-11 23:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-19 20:35 [Bug middle-end/42110] New: [4.5 Regression] ICE with inlining reichelt at gcc dot gnu dot org
2009-11-19 20:36 ` [Bug middle-end/42110] " reichelt at gcc dot gnu dot org
2009-11-20 10:58 ` rguenth at gcc dot gnu dot org
2009-11-27 11:25 ` rguenth at gcc dot gnu dot org
2009-11-27 11:35 ` rguenth at gcc dot gnu dot org
2009-12-04 12:03 ` rguenth at gcc dot gnu dot org
2009-12-04 12:06 ` rguenth at gcc dot gnu dot org
2009-12-04 13:00 ` rguenth at gcc dot gnu dot org
2009-12-04 13:45 ` hjl dot tools at gmail dot com
2009-12-08 15:57 ` hubicka at gcc dot gnu dot org
2009-12-08 16:01 ` rguenth at gcc dot gnu dot org
2009-12-08 16:35 ` hubicka at ucw dot cz
2009-12-08 16:36 ` hubicka at gcc dot gnu dot org
2009-12-10 20:51 ` hubicka at gcc dot gnu dot org
2009-12-11 11:18 ` hubicka at gcc dot gnu dot org
2009-12-11 23:41 ` hjl at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).