public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/44206]  New: [4.6 Regression] ICE: Inline clone with address taken
@ 2010-05-20  6:22 reichelt at gcc dot gnu dot org
  2010-05-20  6:24 ` [Bug middle-end/44206] " reichelt at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2010-05-20  6:22 UTC (permalink / raw)
  To: gcc-bugs

The following valid code snippet triggers an ICE on trunk when compiled with
"-O3" on i686-pc-linux-gnu and x86_64-unknown-linux-gnu:

===================================================
template<int> struct A
{
  void foo(void(*)(A));
  void bar(void(*f)(A)) { foo(f); foo(f); }
};

template<int N> inline void FOO(A<N> a)
{
  a.foo(0);
}

extern template void FOO(A<0>);

void BAR()
{
  A<0> a;
  FOO(a);
  a.bar(FOO);
}
===================================================

bug.cc:19:1: error: Inline clone with address taken
void FOO(A<N>) [with int N = 0]/5(-1) @0x40228780 (asm: _Z3FOOILi0EEv1AIXT_EE)
(inline copy in void BAR()/0) availability:local analyzed 12 time, 11 benefit 3
size, 2 benefit address_taken body local finalized inlinable
  called by: void BAR()/0 (1.00 per call) (inlined) (can throw external) 
  calls: void A<<anonymous> >::foo(void (*)(A<<anonymous> >)) [with int
<anonymous> = 0, A<<anonymous> > = A<0>]/3 (1.00 per call) (can throw external) 
  References: 
  Refering this function:  fn:void A<<anonymous> >::bar(void (*)(A<<anonymous>
>)) [with int <anonymous> = 0, A<<anonymous> > = A<0>]/4 (addr) fn:void
A<<anonymous> >::bar(void (*)(A<<anonymous> >)) [with int <anonymous> = 0,
A<<anonymous> > = A<0>]/4 (addr)
bug.cc:19:1: internal compiler error: verify_cgraph_node failed
Please submit a full bug report, [etc.]

This is probably related to PR 44121.


-- 
           Summary: [4.6 Regression] ICE: Inline clone with address taken
           Product: gcc
           Version: 4.6.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=44206


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

* [Bug middle-end/44206] [4.6 Regression] ICE: Inline clone with address taken
  2010-05-20  6:22 [Bug middle-end/44206] New: [4.6 Regression] ICE: Inline clone with address taken reichelt at gcc dot gnu dot org
@ 2010-05-20  6:24 ` reichelt at gcc dot gnu dot org
  2010-05-21  1:16 ` hjl dot tools at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2010-05-20  6:24 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.0


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


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

* [Bug middle-end/44206] [4.6 Regression] ICE: Inline clone with address taken
  2010-05-20  6:22 [Bug middle-end/44206] New: [4.6 Regression] ICE: Inline clone with address taken reichelt at gcc dot gnu dot org
  2010-05-20  6:24 ` [Bug middle-end/44206] " reichelt at gcc dot gnu dot org
@ 2010-05-21  1:16 ` hjl dot tools at gmail dot com
  2010-07-23 11:55 ` rguenth at gcc dot gnu dot org
  2010-08-18 19:43 ` changpeng dot fang at amd dot com
  3 siblings, 0 replies; 7+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-05-21  1:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2010-05-21 01:16 -------
It is caused by revision 159354:

http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg00406.html


-- 


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


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

* [Bug middle-end/44206] [4.6 Regression] ICE: Inline clone with address taken
  2010-05-20  6:22 [Bug middle-end/44206] New: [4.6 Regression] ICE: Inline clone with address taken reichelt at gcc dot gnu dot org
  2010-05-20  6:24 ` [Bug middle-end/44206] " reichelt at gcc dot gnu dot org
  2010-05-21  1:16 ` hjl dot tools at gmail dot com
@ 2010-07-23 11:55 ` rguenth at gcc dot gnu dot org
  2010-08-18 19:43 ` changpeng dot fang at amd dot com
  3 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-23 11:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2010-07-23 11:55 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Priority|P3                          |P1
   Last reconfirmed|0000-00-00 00:00:00         |2010-07-23 11:55:17
               date|                            |


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


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

* [Bug middle-end/44206] [4.6 Regression] ICE: Inline clone with address taken
  2010-05-20  6:22 [Bug middle-end/44206] New: [4.6 Regression] ICE: Inline clone with address taken reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2010-07-23 11:55 ` rguenth at gcc dot gnu dot org
@ 2010-08-18 19:43 ` changpeng dot fang at amd dot com
  3 siblings, 0 replies; 7+ messages in thread
From: changpeng dot fang at amd dot com @ 2010-08-18 19:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from changpeng dot fang at amd dot com  2010-08-18 19:43 -------
*** Bug 45269 has been marked as a duplicate of this bug. ***


-- 

changpeng dot fang at amd dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |changpeng dot fang at amd
                   |                            |dot com


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


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

* [Bug middle-end/44206] [4.6 Regression] ICE: Inline clone with address taken
       [not found] <bug-44206-4@http.gcc.gnu.org/bugzilla/>
  2010-10-16 23:47 ` hubicka at gcc dot gnu.org
@ 2010-11-08 10:09 ` jakub at gcc dot gnu.org
  1 sibling, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-08 10:09 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-08 10:09:10 UTC ---
Fixed.


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

* [Bug middle-end/44206] [4.6 Regression] ICE: Inline clone with address taken
       [not found] <bug-44206-4@http.gcc.gnu.org/bugzilla/>
@ 2010-10-16 23:47 ` hubicka at gcc dot gnu.org
  2010-11-08 10:09 ` jakub at gcc dot gnu.org
  1 sibling, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2010-10-16 23:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> 2010-10-16 23:47:13 UTC ---
Author: hubicka
Date: Sat Oct 16 23:47:08 2010
New Revision: 165569

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165569
Log:
    PR middle-end/44206
    * g++.dg/torture/pr44206.C: New.
    * ipa.c (cgraph_remove_unreachable_nodes): Cleanup; check
    existence of refrences before removing the function.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr44206.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa.c
    trunk/gcc/testsuite/ChangeLog


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

end of thread, other threads:[~2010-11-08 10:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-20  6:22 [Bug middle-end/44206] New: [4.6 Regression] ICE: Inline clone with address taken reichelt at gcc dot gnu dot org
2010-05-20  6:24 ` [Bug middle-end/44206] " reichelt at gcc dot gnu dot org
2010-05-21  1:16 ` hjl dot tools at gmail dot com
2010-07-23 11:55 ` rguenth at gcc dot gnu dot org
2010-08-18 19:43 ` changpeng dot fang at amd dot com
     [not found] <bug-44206-4@http.gcc.gnu.org/bugzilla/>
2010-10-16 23:47 ` hubicka at gcc dot gnu.org
2010-11-08 10:09 ` jakub at gcc dot gnu.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).